Home / Articles / Programming languages / Markup languages / HTML & CSS / HTML5: how to determine the encoding standard

HTML5: how to determine the encoding standard

HTML5: how to determine the encoding standard
 
Authors: Daisy Smith
HTML5: how to determine the encoding standard
  • Currently 0 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


In order to set the encoding for your page, you must do the following:

In the element head, place the element meta with the following value:

<meta charset="UTF-8" />

Unicode (UTF-8) - is a universal encoding standard that meets the needs of the majority of web developers.

The encoding tells the browser what set of character must be used on a Web page. If HTML-document doesn't specify the encoding, the browser will try to determine it by checking the headers of HTTP-server - Content Type.

The encoding specified in Content Type is more important than in HTML-document, so always pay more attention to the header as the primary source which determines this kind of information. You can also control what exactly the headers sent by the server contain. To do this, set encoding in HTML-document. This is the best option.

If the information about encoding is missing in the header and document then the browser will try make the choice on its own. If this happens you may have problems when displaying the Web pages.

In the earlier versions of HTML encoding was set by additional values:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

 HTML5 displays the brief information required by the browsers:

<meta charset="UTF-8" />

 

Read also

HTML5: optimization of <link> and <script>

HTML5: optimization of <link> and <script>

HTML5: adding new elements

HTML5: adding new elements

HTML5: elements article and section

HTML5: elements article and section

Post comment

basicuse.net
html5_css
106160485398655174790

Quick navigation

General navigation