Académique Documents
Professionnel Documents
Culture Documents
tn
Première Page
<!DOCTYPE HTML>
<head>
<meta charset="UTF-8">
<!-- myFirst.html -->
<title>Ma première page title>
</head>
<body>
<h1> Bienvenue sur mon site</h1>
</body>
</html>
Taille du texte
Paragraphe
Italic
1
HTML5 2eme info www.mathinfo.tn
Mettre en valeur
Marquer un texte
Indice exposant
Ligne horizontal
Indice et exposant
2
HTML5 2eme info www.mathinfo.tn
Retour à la ligne
<p>Bonjour et bienvenue sur mon site ! Ceci est mon premier test </br>
j'apprends petit à petit comment cela marche.</p>
Quote
<blockquote cite="http://en.wikipedia.org/wiki/
Winnie-the-Pooh">
<p>Did you ever stop to think, and forget to start again?</p>
</blockquote>
<p>As A.A. Milne said, <q>Some people talk to animals. Not many listen though.
That's the
problem.</q></p>
Abréviation
<p><abbr title="Professor">Prof</abbr> Stephen Hawking is a theoretical
physicist and cosmologist.</p>
<p><acronym title="National Aeronautics and Space Administration">NASA</acronym>
do some crazy
space stuff.</p>
cite
<p><cite>A Brief History of Time</cite> by Stephen Hawking has sold over ten
million copies
worldwide.</p>
Les listes
Les listes nous permettent souvent de mieux structurer notre texte et d'ordonner nos informations.
Nous allons découvrir ici deux types de listes :
Fraises
Framboises
Cerises
C'est un système qui nous permet de créer une liste d'éléments sans notion d'ordre (il n'y a pas de «
premier » ni de « dernier »). Créer une liste non ordonnée est très simple. Il suffit d'utiliser la
balise<ul>que l'on referme un peu plus loin avec</ul>.
Commencez donc à taper ceci :
<ul>
<li>Fraises</li>
<li>Framboises</li>
<li>Cerises</li>
</ul>
Liste ordonnée
Une liste ordonnée fonctionne de la même façon, seule une balise change : il faut
remplacer<ul></ul>par<ol></ol>.
À l'intérieur de la liste, on ne change rien : on utilise toujours des balises<li></li>pour délimiter les
éléments.
L'ordre dans lequel vous placez les éléments de la liste est important. Le premier<li></li>sera l'élément n° 1, le
second sera le n°2 etc…
<h1>Ma journée</h1>
<ol>
<li>Je me lève.</li>
<li>Je mange et je bois.</li>
<li>Je retourne me coucher.</li>
</ol>
Les tableaux
Exemple 1 :
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
4
HTML5 2eme info www.mathinfo.tn
Exemple 2 :
<table>
<tr>
<th></th>
<th >Samedi</th>
<th >Dimanche</th>
</tr>
<tr>
<th >Prix:</th>
<td>120</td>
<td>135</td>
</tr>
</table>
Exemple 3 :
<table width="400" ">
<tr>
<th width="150"></th>
<th>Debit</th>
<th>Credit</th>
<th width="150">Balance</th>
</tr>
<tr>
<th>Janvier</th>
<td>250.00</td>
<td>660.50</td>
<td>410.50</td>
</tr>
<tr>
<th>Fevrier</th>
<td>135.55</td>
<td>895.20</td>
<td>1170.15</td>
</tr>
</table>
<p>Moteur de recherche:
<ul>
<li><a href="http://www.google.com">Google</a></li>
<li><a href="http://www.yahoo.com" target="_blank">Yahoo</a></li>
<li><a href="http://www.bing.com" target="_blank">Bing</a></li>
</ul>
</p>
5
HTML5 2eme info www.mathinfo.tn
Application
Accueil
Contact
Services
<p>Mes liens:
<ul>
<li><a href="page1">Accueil</a></li>
<li><a href="page2" target="_blank">Contact</a></li>
<li><a href="page3" target="_blank">Services</a></li>
</ul>
</p>
Multimedia
Les images
<h1>Koala :</h1>
<p>
<img src = "Koala.jpg" height = "480" width = "640" alt = "Koala image" />
</p>
Audio
<!DOCTYPE html>
<html>
<body>
<audio controls>
<source src="son.mp3" >
</audio>
</body>
</html>
6
HTML5 2eme info www.mathinfo.tn
Video
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Les formulaires :
<h2>Saisir un texte</h2>
<form>
Nom:<br>
<input type="text" name="nom">
<br>
Prenom:<br>
<input type="text" name="prenom">
</form>
Radio button
<h2>Radio Buttons</h2>
<form>
<input type="radio" name="fruit" value="Orange" checked> Orange<br>
<input type="radio" name="fruit" value="Banane"> Banane<br>
<input type="radio" name="fruit" value="Pomme"> Pomme
</form>
Bouton
<h2>HTML Forms</h2>
<form action="/action_page.php">
Nom:<br>
<input type="text" name="Nom"
<br>
Prenom:<br>
<input type="text" name="Prenom" ">
<br><br>
<input type="submit" value="Submit">
</form>
7
HTML5 2eme info www.mathinfo.tn
Case à cocher
<form>
<input type="checkbox" name="choix1" value="1"> glace
vanille</br>
<input type="checkbox" name="choix2" value="2"> chantilly </br>
<input type="checkbox" name="choix3" value="3"> chocolat chaud
</br>
<input type="checkbox" name="choix4" value="4"> biscuit </br>
</form>
Text area
<form>
<textarea name="nom" >Valeur par défaut</textarea>
</form>
Groupe de bouton
<fieldset>
<legend>Theme color:</legend>
<p>
<input type="radio" name="color" id="red" value="#F00">
<label for="red">Red</label>
</p>
<p>
<input type="radio" name="color" id="green" value="#0F0">
<label for="green">Green</label>
</p>
<p>
<input type="radio" name="color" id="blue" value="#00F">
<label for="blue">Blue</label>
</p>
</fieldset>