xxxxxxxxxx
Voici mon super site !
Quelle joie !
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Mon super premier fichier html</title>
</head>
<body>
<p>
Voici mon super site !
<br>
Quelle joie !
</p>
</body>
</html>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
body{
background-color:lightblue;
}
</style>
</head>
<body>
Changer le texte ici !
</body>
</html>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Mon super premier fichier html</title>
</head>
<body>
<p style="color:#ff0000;">
Voici mon super site !
<br>
Quelle joie !
</p>
</body>
</html>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Mon super premier fichier html</title>
<style>
p{
color: #ff0000;
}
</style>
</head>
<body>
<p>
Voici mon super site !
<br>
Quelle joie !
</p>
</body>
</html>
Nom du fichier : test_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Mon super premier fichier html</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<p>
Voici mon super site !
<br>
Quelle joie !
</p>
</body>
</html>
Nom du fichier : styles.css
xxxxxxxxxx
p{
color:#ff0000;
}
Nom du fichier : test_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="styles.css" />
<title>Mon super premier fichier html</title>
</head>
<body>
<p class="rouge">
Voici mon super site !
<br />
Quelle joie !
</p>
<p class="noir">
Maintenant un joli texte en blanc sur fond noir.
</p>
<p class="rouge">
Revenons au rouge...
</p>
</body>
</html>
Nom du fichier : styles.css
xxxxxxxxxx
.rouge{
color:#ff0000;
}
.noir{
color:#ffffff;
background-color: #000000;
}
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
body{
background-color: ;
}
.para1{
color: black;
}
</style>
</head>
<body>
<p class="para1">
Ce paragraphe doit être écrit en blanc !
</p>
<p class="para2">
Alors que celui-ci en ??? Je ne sais plus ???
</p>
</body>
</html>
<div>
<table>
<a>
<img />
<h1>
background-image
font-size
width
height
margin
opacity
word-wrap
border-radius
border
box-shadow
position
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
body{
background-color: lightgreen;
}
#rectangle{
position: absolute;
top: 200px;
left: 50px;
width: 150px;
height: 80px;
background-color: white;
border: solid 3px black;
}
#balle{
position: absolute;
top: 100px;
left: 50px;
width: 80px;
height: 80px;
border-radius: 80px;
background-color: lightblue;
border: solid 3px black;
}
</style>
</head>
<body>
<div id="rectangle"></div>
<div id="balle"></div>
</body>
</html>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
</style>
</head>
<body>
</body>
</html>
Nom du fichier : page_web.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="mon_style.css" />
<title>Pas à Pas</title>
</head>
<body>
</body>
</html>
Nom du fichier : mon_style.css
fractale.png
Nom du fichier : mon_style.css
xxxxxxxxxx
body{
background-image:url('fractale.png');
}
Nom du fichier : mon_style.css
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
}
Nom du fichier : mon_style.css
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
Nom du fichier : page_web.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="mon_style.css" />
<title>Pas à Pas</title>
</head>
<body>
<div id="banniere">
</div>
<div id="conteneur">
<div class="paragraphe">
</div>
<div class="paragraphe">
</div>
<div class="paragraphe">
</div>
</div>
</body>
</html>
Nom du fichier : page_web.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="mon_style.css" />
<title>Pas à Pas</title>
</head>
<body>
<div id="banniere">
Harum trium sententiarum
</div>
<div id="conteneur">
<div class="paragraphe">
<h2>Quam multa enim</h2>
Batnae municipium in Anthemusia conditum
Macedonum manu priscorum ab Euphrate
flumine brevi spatio disparatur, refertum
mercatoribus opulentis, ubi annua
sollemnitate prope Septembris initium
mensis ad nundinas magna promiscuae
fortunae convenit multitudo ad commercanda
quae Indi mittunt et Seres aliaque plurima
vehi terra marique consueta
</div>
Nom du fichier : mon_style.css
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
}
#conteneur{
background-color:#ffffff;
}
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
}
#conteneur{
background-color:#ffffff;
}
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
font-weight:bold;
text-shadow: 2px 3px 2px #929292;
border-radius:5px;
}
#conteneur{
background-color:#ffffff;
}
Nom du fichier : julia.png
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
font-weight:bold;
text-shadow: 2px 3px 2px #929292;
border-radius:5px;
background-image:url('julia.png');
background-repeat: no-repeat;
background-position: top left;
height: 100px;
line-height:100px;
}
#conteneur{
background-color:#ffffff;
}
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
font-weight:bold;
text-shadow: 2px 3px 2px #929292;
border-radius:5px;
background-image:url('julia.png');
background-repeat: no-repeat;
background-position: top left;
height: 100px;
line-height:100px;
}
#conteneur{
background-color:#ffffff;
margin-top: 30px;
padding-top:10px;
padding-bottom:10px;
width: 70%;
border-radius:5px;
}
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
font-weight:bold;
text-shadow: 2px 3px 2px #929292;
border-radius:5px;
background-image:url('julia.png');
background-repeat: no-repeat;
background-position: top left;
height: 100px;
line-height:100px;
}
#conteneur{
background-color:#ffffff;
margin-top: 30px;
padding-top:10px;
padding-bottom:10px;
width: 70%;
border-radius:5px;
}
.paragraphe{
width:50%;
margin:auto;
}
Nom du fichier : vign_2.jpg
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
font-weight:bold;
text-shadow: 2px 3px 2px #929292;
border-radius:5px;
background-image:url('julia.png');
background-repeat: no-repeat;
background-position: top left;
height: 100px;
line-height:100px;
}
#conteneur{
background-color:#ffffff;
margin-top: 30px;
padding-top:10px;
padding-bottom:10px;
width: 70%;
border-radius:5px;
}
.paragraphe{
width:50%;
margin:auto;
}
h2{
background-image:url('vign_2.jpg');
background-repeat: no-repeat;
background-position: top left;
padding-left:50px;
height:50px;
line-height:50px;
}
Nom du fichier : fractale.jpg
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="mon_style.css" />
<title>Pas à Pas</title>
</head>
<body>
<div id="banniere">
Harum trium sententiarum
</div>
<div id="conteneur">
<div class="paragraphe">
<h2>Quam multa enim</h2>
Batnae municipium in Anthemusia conditum
Macedonum manu priscorum ab Euphrate
flumine brevi spatio disparatur, refertum
mercatoribus opulentis, ubi annua
sollemnitate prope Septembris initium
mensis ad nundinas magna promiscuae
fortunae convenit multitudo ad commercanda
quae Indi mittunt et Seres aliaque plurima
vehi terra marique consueta
</div>
<div class="paragraphe">
xxxxxxxxxx
body{
background-image:url('fractale.png');
background-repeat: no-repeat;
background-position: top right;
background-color: #000000;
}
#banniere{
background-color:#ffffff;
width:70%;
text-align:center;
font-size:2em;
padding-top:10px;
padding-bottom:10px;
font-weight:bold;
text-shadow: 2px 3px 2px #929292;
border-radius:5px;
background-image:url('julia.png');
background-repeat: no-repeat;
background-position: top left;
height: 100px;
line-height:100px;
}
#conteneur{
background-color:#ffffff;
margin-top: 30px;
Nom du fichier : concours.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>Concours CSS</title>
<link rel="stylesheet" href="concours_style.css" />
</head>
<body>
<div id="ban">
Concours CSS - Lycée Gutenberg
</div>
<div id="corps_site">
<div id="para_1">
<h2>La couleur des sables brûlants</h2>
Pandente itaque viam fatorum sorte tristissima, qua praestitutum
erat eum vita et imperio spoliari, itineribus interiectis
permutatione iumentorum emensis venit Petobionem oppidum Noricorum,
ubi reseratae sunt insidiarum latebrae omnes, et Barbatio repente
apparuit comes, qui sub eo domesticis praefuit, cum Apodemio agente
in rebus milites ducens, quos beneficiis suis oppigneratos elegerat
imperator certus nec praemiis nec miseratione ulla posse deflecti.
</div>
<div id="para_2">
<h2>Le son du vent lointain</h2>
Quapropter a natura mihi videtur potius quam ab indigentia orta
amicitia, applicatione magis animi cum quodam sensu amandi quam
cogitatione quantum illa res utilitatis esset habitura.
Nom du fichier : concours_style.html
xxxxxxxxxx
body{
}
h2{
}
#ban{
}
#corps_site{
}
#para_1{
}
.entree_menu{
}
#footer{
}
Nom du fichier : js_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 01</title>
<style>
.noir{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 100px;
background-color: #000000;
}
.rouge{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 250px;
background-color: #DF0101;
}
.bleu{
width: 100px;
Nom du fichier : js_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 01</title>
<style>
.noir{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 100px;
background-color: #000000;
}
.rouge{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 250px;
background-color: #DF0101;
}
.bleu{
width: 100px;
Nom du fichier : js_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 01</title>
<style>
.noir{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 100px;
background-color: #000000;
}
.rouge{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 250px;
background-color: #DF0101;
}
.bleu{
width: 100px;
height: 100px;
position: absolute;
<script> ... </script>
function boite(texte) { alert(texte); }
<div class="noir" onclick="boite('Noir');">nous dit que si l'utilisateur clique sur cette div on exécute la fonction boite avec comme paramètre 'Noir'. La variable texte de la fonction devient donc 'Noir'.
Nom du fichier : js_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 01</title>
<style>
.noir{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 100px;
background-color: #000000;
}
.rouge{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 250px;
background-color: #DF0101;
}
.bleu{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
var i = 0;fait que lorsque le navigateur crée la page web, il va créé également une variable
i = i+1;fera augmenter la variable
phrase = "Vous avez cliqué "+i+" fois.\n Et vous aimez la boite "+texte;permet de créer une chaîne de caractères qui commence par "Vous avez cliqué " et ensuite nous voulons ajouter le nombre de clics qui se sont produits. C'est la variable
Nom du fichier : js_01.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 01</title>
<style>
.noir{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 100px;
background-color: #000000;
}
.rouge{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 250px;
background-color: #DF0101;
}
.bleu{
width: 100px;
height: 100px;
position: absolute;
top: 200px;
left: 400px;
background-color: #2E2EFE;
}
var elt_mes = document.getElementById("message");La variable elt_mes est un objet que l'on trouve dans le "document" (on peut dire dans la page web) et qui porte l'id "message". Ainsi, on pourra utiliser elt_mes pour interagir avec la div "message".
elt_mes.innerHTML = phrase;permet justement de modifier le contenu html de la div "message". On le remplace par la chaîne de caractère phrase. C'est d'ailleurs pour cela que nous avons remplacer "\n" par "<br />" car en html le retour chariot "\n" n'est pas reconnu par tous les navigateurs, alors que la balise "<br />" oui.
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
#obj{
width: 200px;
padding: 20px;
border: solid 3px black;
background-color: lightcoral;
text-align: center;
}
#resultat{
width: 200px;
padding: 20px;
border: solid 3px black;
background-color: lightgray;
text-align: center;
margin-top: 50px;
}
#zero{
width: 200px;
padding: 20px;
document.getElementById("message");on récupérait en fait l'élément
Nom du fichier : js_02.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 02</title>
<style>
#balle{
position: absolute;
top: 100px;
left: 200px;
width: 100px;
height: 100px;
border-radius: 100px;
background-color: black;
}
</style>
<script>
function init(){
var balle = document.getElementById('balle');
balle.style.backgroundColor = "red";
}
</script>
</head>
<body onload="init()">
<div id="balle"></div>
</body>
</html>
Nom du fichier : js_03.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 03</title>
<style>
#haut{
width:0px;
border:20px solid transparent;
border-bottom:20px solid black;
position: absolute;
bottom: 120px;
left: 100px;
}
#bas{
width:0px;
border:20px solid transparent;
border-top:20px solid black;
position: absolute;
bottom: 40px;
left: 100px;
}
#gauche{
width:0px;
border:20px solid transparent;
border-right:20px solid black;
position: absolute;
bottom: 80px;
left: 60px;
}
#droite{
width:0px;
border:20px solid transparent;
border-left:20px solid black;
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
.case{
padding: 20px;
border: solid 2px black;
}
#couleur{
width: 50px;
height: 50px;
border: solid 3px black;
margin-top: 50px;
left: 100px;
background-color: rgb(0,100,0);
}
#green{
width: 100px;
}
</style>
</head>
<body>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<style>
#couleur{
width: 50px;
height: 50px;
border: solid 3px black;
margin-top: 50px;
left: 100px;
background-color: rgb(100,100,100);
}
</style>
</head>
<body>
<input type="range" min="0" max="255" oninput="modifieRed(this.value)"> Red
<br>
<input type="range" min="0" max="255" oninput="modifieGreen(this.value)"> Green
Nom du fichier : js_04.html
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>JS 04</title>
<style>
#balle{
width: 50px;
height: 50px;
border-radius: 50px;
background-color: #ff0000;
position: absolute;
left: 200px;
top: 200px;
}
</style>
<script>
function init() {
var balle = document.getElementById('balle');
balle.style.top = "200px";
balle.style.left = "200px";
}
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
</body>
</html>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
</style>
<script>
</script>
</head>
<body>
</body>
</html>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>Noix de cocos</title>
<style>
#beach{
position: absolute;
top:100px;
left:50px;
width: 837px;
height: 463px;
background-image: url("beach.png");
background-size: contain;
background-repeat: no-repeat;
border: solid 2px black;
border-radius: 5px;
z-index: 1000;
}
#crabe{
position: absolute;
top: 523px;
left: 100px;
height: 30px;
width: 36px;
background-image: url("crabe.png");
background-size: contain;
z-index: 2000;
}
.coco{
position: absolute;
top: 100px;
left: 200px;
height: 26px;
width: 20px;
background-image: url("coco.png");
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>Noix de cocos</title>
<style>
#beach{
position: absolute;
top:100px;
left:50px;
width: 837px;
height: 463px;
background-image: url("beach.png");
background-size: contain;
background-repeat: no-repeat;
border: solid 2px black;
border-radius: 5px;
z-index: 1000;
}
#crabe{
position: absolute;
top: 523px;
left: 100px;
height: 30px;
width: 36px;
background-image: url("crabe.png");
background-size: contain;
z-index: 2000;
}
.coco{
position: absolute;
top: 100px;
left: 200px;
height: 26px;
width: 20px;
background-image: url("coco.png");
background-size: contain;
z-index: 2000;
visibility: hidden;
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>Noix de cocos</title>
<style>
#beach{
position: absolute;
top:100px;
left:50px;
width: 837px;
height: 463px;
background-image: url("beach.png");
background-size: contain;
background-repeat: no-repeat;
border: solid 2px black;
border-radius: 5px;
z-index: 1000;
}
#crabe{
position: absolute;
top: 523px;
left: 100px;
height: 30px;
width: 36px;
background-image: url("crabe.png");
background-size: contain;
z-index: 2000;
}
.coco{
position: absolute;
top: 100px;
left: 200px;
height: 26px;
width: 20px;
background-image: url("coco.png");
background-size: contain;
z-index: 2000;
visibility: hidden;
}
#temps{
position: absolute;
background-color: black;
border-radius: 5px;
padding: 10px;
color: white;
font-weight: bold;
width: 150px;
text-align: center;
}
#debut{
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background-color: black;
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>Noix de cocos</title>
<style>
#beach{
position: absolute;
top:100px;
left:50px;
width: 837px;
height: 463px;
background-image: url("beach.png");
background-size: contain;
background-repeat: no-repeat;
border: solid 2px black;
border-radius: 5px;
z-index: 1000;
}
#crabe{
position: absolute;
top: 523px;
left: 100px;
height: 30px;
width: 36px;
background-image: url("crabe.png");
background-size: contain;
z-index: 2000;
}
.coco{
position: absolute;
top: 100px;
left: 200px;
height: 26px;
width: 20px;
background-image: url("coco.png");
background-size: contain;
z-index: 2000;
visibility: hidden;
}
#temps{
position: absolute;
background-color: black;
border-radius: 5px;
padding: 10px;
color: white;
font-weight: bold;
width: 150px;
text-align: center;
}
#debut{
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background-color: black;
padding-top: 200px;
color: white;
font-size: 200%;
text-shadow: 5px 5px 10px gray;
z-index: 2000;
text-align: center;
}
</style>
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8" />
<title>Noix de cocos</title>
<style>
#beach{
position: absolute;
top:100px;
left:50px;
width: 837px;
height: 463px;
background-image: url("beach.png");
background-size: contain;
background-repeat: no-repeat;
border: solid 2px black;
border-radius: 5px;
z-index: 1000;
}
#crabe{
position: absolute;
top: 523px;
left: 100px;
height: 30px;
width: 36px;
background-image: url("crabe.png");
background-size: contain;
z-index: 2000;
}
.coco{
position: absolute;
top: 100px;
left: 200px;
height: 26px;
width: 20px;
background-image: url("coco.png");
background-size: contain;
z-index: 2000;
visibility: hidden;
}
#temps{
position: absolute;
background-color: black;
border-radius: 5px;
padding: 10px;
color: white;
font-weight: bold;
width: 150px;
text-align: center;
}
#debut{
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background-color: black;
padding-top: 200px;
color: white;
font-size: 200%;
text-shadow: 5px 5px 10px gray;
z-index: 2000;
text-align: center;
}
</style>
<script>
var time, collision, chronoTime;
function initialise() {
document.getElementById("debut").style.visibility = "hidden";
time = 0;
collision = 0;
var eltCrabe = document.getElementById("crabe");
eltCrabe.style.left = "200px";