projprog/HTML3.md

39 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

HTML 4
=
### Exercice 1
1. Pour ajouter du texte dans une page web, il suffit de l'écrire dans la balise <body>. En général, d'autres balises entoureront ce texte afin de pourvoir le manipuler plus précisément. Attention toutefois, pour les caractères compliqués (accents, crochets, ...), il faut les écrire en utilisant leur code html (`&eacute;`) ou leur code unicode décimal (`&#233;`) ou héxadécimal (`&#xE9;`)
2. Pour faire un retour à la ligne, il faut utiliser la balise `br` ainsi: `<br/>`
### Exercice 2
```
<!DOCTYPE html>
<html>
<head></head>
<body>Les cours de PROJ1, c'est bien !</body>
</html>
```
### Exercice 3
Pour ajouter une image, il faut utiliser la balise `img` sans contenu avec les attributs suivants:
* `src`: URL de l'image à afficher
* `alt`: Un texte dérivant l'image, pour l'accessibilité.
* `width` et `height` pour spécifier les dimensions à utiliser (optionnel).
### Exercice 4
```
<!DOCTYPE html>
<html>
<head></head>
<body>
Les cours de PROJ1, c'est bien !
<img src="https://www.pokepedia.fr/images/c/cd/Rondoudou-RFVF.png" alt="Artwork du pokémon Rondoudou"/>
</body>
</html>
```
### Exercice 5
RAS