Table des matières
Le Tutoriel de HTML Entity
View more Tutorials:


Il y a quelques caractères spéciaux qui s'ils apparaissent dans un document HTML, peuvent causer des malentendus dans l'analyseur de source HTML. Par exemple, lorsque l'analyseur de source HTML rencontre le caractère "plus petit" (<), il peut confondre le caractère avec une balise. Par conséquent, pour éviter tout malentendu, HTML utilise l'entité < à la place du caractère ( <)).
Voici quelques caractères communs qui doivent être remplacés par des entités (entity). A propos de la liste complète, vous pouvez la voir à la fin de cet article.
Caractère | Description | Nom Entité |
---|---|---|
Espace incassable (Non-breaking Space) | | |
< | Moins de | < |
> | Supérieur à | > |
& | Esperluette (ampersand) | & |
" | Guillemets (Double quotation mark) | " |
' | Guillemets simples (Single quotation mark) (apostrophe) | ' |
Jetez un coup d'œil à un document HTML avec la présence d'entités et les résultats que vous voyez dans le navigateur.
entity-example.html
<!DOCTYPE html>
<html>
<head>
<title>Entities</title>
<meta charset="UTF-8">
</head>
<body>
<h3>Entities example:</h3>
HTML defines six levels of headings. <br/>
The heading elements are: <br/><br/>
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>
</body>
</html>

En plus des entités représentant les caractères erronés mentionnés ci-dessus, il existe une liste de nombreuses entités représentant d'autres caractères spéciaux (£ § ¢ ¥ ©...).
Character | Description | Entity Name |
¢ | cent | ¢ |
£ | pound | £ |
¥ | yen | ¥ |
§ | section | § |
© | copyright | © |
® | registered trademark | ® |
Note : Vous pouvez voir la liste complète des entités HTML à la fin de cet article.
Il y a deux façons de se référer à une entité. L'une consiste à utiliser le "Nom de l'entité" et l'autre, le "Numéro de l'entité". Par exemple, pour faire référence au caractère (<), vous pouvez éventuellement utiliser le nom de l'entité ( < ) ou le numéro de l'entité ( < ).
&entity_name;
&#entity_number;
L'avantage d'utiliser un nom d'entité (entity name) est qu'il est facile à retenir. Cependant, l'inconvénient est que certains navigateurs peuvent ne pas prendre en charge tous les noms d'entités, alors qu'ils prennent entièrement en charge les numéros d'entités.
Display | Description | Entity Name | Entity Number |
---|---|---|---|
Non-breaking space | |   | |
< | Less than | < | < |
> | Greater than | > | > |
& | Ampersand | & | & |
" | Double quotation mark | " | " |
' | Single quotation mark (apostrophe) | ' | ' |
Remarque : Vous trouverez la liste complète des entités HTML avec leurs noms et numéros à la fin de cet article.
L'entité est utilisé pour remplacer l'espace insécable (Non-breaking space). Permettez-moi de donner un exemple pour illustrer ce point :

non-breaking-space-example.html
<p style="font-size:40px">
This is a non breaking Sentence !!
</p>
<p style="font-size:40px">
This sentence will be line breaks.
</p>
ISO 8859-1 Symbol Entities
Display | Description | Entity Name | Number Code |
---|---|---|---|
non-breaking space | |   | |
¡ | inverted exclamation mark | ¡ | ¡ |
¤ | currency | ¤ | ¤ |
¢ | cent | ¢ | ¢ |
£ | pound | £ | £ |
¥ | yen | ¥ | ¥ |
¦ | broken vertical bar | ¦ | ¦ |
§ | section | § | § |
¨ | spacing diaeresis | ¨ | ¨ |
© | copyright | © | © |
ª | feminine ordinal indicator | ª | ª |
« | angle quotation mark (left) | « | « |
¬ | negation | ¬ | ¬ |
| soft hyphen | ­ | ­ |
® | registered trademark | ® | ® |
™ | trademark | ™ | ™ |
¯ | spacing macron | ¯ | ¯ |
° | degree | ° | ° |
± | plus-or-minus | ± | ± |
² | superscript 2 | ² | ² |
³ | superscript 3 | ³ | ³ |
´ | spacing acute | ´ | ´ |
µ | micro | µ | µ |
¶ | paragraph | ¶ | ¶ |
· | middle dot | · | · |
¸ | spacing cedilla | ¸ | ¸ |
¹ | superscript 1 | ¹ | ¹ |
º | masculine ordinal indicator | º | º |
» | angle quotation mark (right) | » | » |
¼ | fraction 1/4 | ¼ | ¼ |
½ | fraction 1/2 | ½ | ½ |
¾ | fraction 3/4 | ¾ | ¾ |
¿ | inverted question mark | ¿ | ¿ |
× | multiplication | × | × |
÷ | division | ÷ | ÷ |
ISO 8859-1 Character Entities
Display | Description | Entity Name | Number Code |
---|---|---|---|
À | capital a, grave accent | À | À |
Á | capital a, acute accent | Á | Á |
 | capital a, circumflex accent |  |  |
à | capital a, tilde | à | à |
Ä | capital a, umlaut mark | Ä | Ä |
Å | capital a, ring | Å | Å |
Æ | capital ae | Æ | Æ |
Ç | capital c, cedilla | Ç | Ç |
È | capital e, grave accent | È | È |
É | capital e, acute accent | É | É |
Ê | capital e, circumflex accent | Ê | Ê |
Ë | capital e, umlaut mark | Ë | Ë |
Ì | capital i, grave accent | Ì | Ì |
Í | capital i, acute accent | Í | Í |
Î | capital i, circumflex accent | Î | Î |
Ï | capital i, umlaut mark | Ï | Ï |
Ð | capital eth, Icelandic | Ð | Ð |
Ñ | capital n, tilde | Ñ | Ñ |
Ò | capital o, grave accent | Ò | Ò |
Ó | capital o, acute accent | Ó | Ó |
Ô | capital o, circumflex accent | Ô | Ô |
Õ | capital o, tilde | Õ | Õ |
Ö | capital o, umlaut mark | Ö | Ö |
Ø | capital o, slash | Ø | Ø |
Ù | capital u, grave accent | Ù | Ù |
Ú | capital u, acute accent | Ú | Ú |
Û | capital u, circumflex accent | Û | Û |
Ü | capital u, umlaut mark | Ü | Ü |
Ý | capital y, acute accent | Ý | Ý |
Þ | capital THORN, Icelandic | Þ | Þ |
ß | small sharp s, German | ß | ß |
à | small a, grave accent | à | à |
á | small a, acute accent | á | á |
â | small a, circumflex accent | â | â |
ã | small a, tilde | ã | ã |
ä | small a, umlaut mark | ä | ä |
å | small a, ring | å | å |
æ | small ae | æ | æ |
ç | small c, cedilla | ç | ç |
è | small e, grave accent | è | è |
é | small e, acute accent | é | é |
ê | small e, circumflex accent | ê | ê |
ë | small e, umlaut mark | ë | ë |
ì | small i, grave accent | ì | ì |
í | small i, acute accent | í | í |
î | small i, circumflex accent | î | î |
ï | small i, umlaut mark | ï | ï |
ð | small eth, Icelandic | ð | ð |
ñ | small n, tilde | ñ | ñ |
ò | small o, grave accent | ò | ò |
ó | small o, acute accent | ó | ó |
ô | small o, circumflex accent | ô | ô |
õ | small o, tilde | õ | õ |
ö | small o, umlaut mark | ö | ö |
ø | small o, slash | ø | ø |
ù | small u, grave accent | ù | ù |
ú | small u, acute accent | ú | ú |
û | small u, circumflex accent | û | û |
ü | small u, umlaut mark | ü | ü |
ý | small y, acute accent | ý | ý |
þ | small thorn, Icelandic | þ | þ |
ÿ | small y, umlaut mark | ÿ | ÿ |
D'autres entités sont soutenues par les navigateurs.
Display | Description | Entity Name | Number Code |
---|---|---|---|
Œ | capital ligature OE | Œ | Œ |
œ | small ligature oe | œ | œ |
Š | capital S with caron | Š | Š |
š | small S with caron | š | š |
Ÿ | capital Y with diaeres | Ÿ | Ÿ |
ˆ | modifier letter circumflex accent | ˆ | ˆ |
˜ | small tilde | ˜ | ˜ |
en space |   |   | |
em space |   |   | |
thin space |   |   | |
| zero width non-joiner | ‌ | ‌ |
| zero width joiner | ‍ | ‍ |
| left-to-right mark | ‎ | ‎ |
| right-to-left mark | ‏ | ‏ |
– | en dash | – | – |
— | em dash | — | — |
‘ | left single quotation mark | ‘ | ‘ |
’ | right single quotation mark | ’ | ’ |
‚ | single low-9 quotation mark | ‚ | ‚ |
“ | left double quotation mark | “ | “ |
” | right double quotation mark | ” | ” |
„ | double low-9 quotation mark | „ | „ |
† | dagger | † | † |
‡ | double dagger | ‡ | ‡ |
… | horizontal ellipsis | … | … |
‰ | per mille | ‰ | ‰ |
‹ | single left-pointing angle quotation | ‹ | ‹ |
› | single right-pointing angle quotation | › | › |
€ | euro | € | € |