HTML and meta-charset properties
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:
<meta charset="UTF-8">
</head>
Try it out . . .
Browser support
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
The property value
value | describe |
---|---|
character_set |
Specifies the character encoding of the HTML document.
Common value:
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 .lt;meta.gt; tags