====== 2.2.1. Ensure the correct encoding of all characters ====== In order to obtain the correct rendering of text content, a declaration of the character set must be included on each page. In the following example, the '''' tag is used. […] This '''' tag must be inserted as high as possible in the HTML page, before any content that is displayed on the screen, and preferably immediately after the opening '''' tag. **Warning** Remember also to check the correct coding of characters that are not automatically displayed on the screen, especially: * Content of the ''title'' attributes. * Text that is hidden by default. * Content of the alt attributes of images. * Etc. **HTML5** HTML5 simplifies the writing of the '''' tag for the declaration of the character set. If you choose this type of document, you just need to use a statement like: ''''. ===== Related recommendations ===== * Previous recommendation: [[notices:html-css:enseigner-un-title-precis-sur-chaque-page]] * Next recommendation: [[notices:html-css:renseigner-la-langue-principale-de-la-page-avec-l-attribut-lang-sur-la-balise-html]]