HTML and meta-charset properties

HTML meta charset property HTML .lt;meta.gt; tags

The charset property in the label is used to specify which character encoding should be used in HTML documents, as detailed in the following method:

Specify the character encoding of HTML documents:

<head>
<meta charset="UTF-8">
</head>

Try it out . . .

Browser support

HTML meta charset property HTML meta charset property HTML meta charset property HTML meta charset property HTML meta charset property

The charset property is supported by all major browsers.


Definitions and usages

The charset property specifies the character encoding of the HTML document.

Tip: The charset property can be overridten by the lang property on any element.


The difference between HTML 4.01 and HTML5

The charset property is a new property in HTML5 and has been replaced with: .lt;meta http-equiv="Content-Type" content=text/html; charset=UTF-8">

The http-equiv property is still allowed to specify character sets, but new methods can reduce the amount of code.


Grammar

<meta charset="character_set">

The property value

value describe
character_set Specifies the character encoding of the HTML document.

Common value:

  • UTF-8 - Unicode Character Coding
  • ISO-8859-1 - Character code of the Latin alphabet

In theory, any character encoding can be used, but not all browsers can understand them.The wider the range of use of a character coding, the more you can understand it.

For all available character encodings, please visit Iana character set


HTML meta charset property HTML .lt;meta.gt; tags