Declaring Your Page’s Character Encoding

Once you’ve decided which character encoding you’re going to use, you should declare that encoding at the beginning of your Web page.

To declare your page’s character encoding:

1.
At the top of the head section of your page, type <meta http-equiv="content-type" content="text/html; (including the dash).
2.
Then type charset=code", where code is the name of the encoding with which you saved your page.
3.
Type /> to complete the meta tag.
Figure 21.6. In the head section of your Web page, create a meta tag that describes the encoding you used to save the file.

✓ Tips

  • Which encoding should you choose? ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.