Par Valentin Brosseau / @c4software
Des documents reliés entre eux
<a><a href="https://cours.brosseau.ovh">Consulter le cours</a>href = hypertext reference
https://google.com (adresse complète)contact.html (chemin depuis la page courante)Il fonctionne partout : sur votre machine, sur le serveur, en ligne…
<a href="contact.html">Même dossier</a>
<a href="article/page.html">Sous-dossier</a>
<a href="../index.html">Dossier parent</a>../À maitriser absolument (liens, images, CSS…)
href="#contact" (vers un id)title="…"href="mailto:moi@exemple.fr"target="_blank" ?Ouvre dans un nouvel onglet…
| Format | Usage |
|---|---|
| JPEG | Les photos |
| PNG | Graphiques, logos, transparence |
| GIF | Uniquement les animations |
<img /><img src="img/photo.jpg" alt="Un chaton qui dort" />src : le chemin (relatif !)alt : la descriptionalt ?alt c'est<a href="img/photo.jpg">
<img src="img/mini.jpg" alt="Ma photo" />
</a>Un lien + une image = 🖼️
<table>
<tr>
<th>Langage</th>
<th>Usage</th>
</tr>
<tr>
<td>HTML</td>
<td>Le contenu</td>
</tr>
</table><tr> : une ligne (table row)<td> : une cellule (table data)<th> : une cellule d'en-tête (table header)<caption> : le titre<thead> : l'en-tête<tbody> : le corps<tfoot> : le piedcolspan="2" : fusion horizontalerowspan="2" : fusion verticaletable>tr*20>td*3Puis la touche tabulation… ✨ (emmet)
alt pertinent.thead, th, colspan).Place au TP 🚀