In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to set the character set in html5". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to set the character set in html5.
The statement that html5 sets the character set is "; the meta tag is used to provide metadata about the HTML document, and when the tag adds the charset attribute, you can specify the character encoding of the HTML document.
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
In html5, you can use labels to set the character set.
Tags are used to provide metadata about HTML documents, such as page validity, page author, keyword list, page description, and so on. The data defined by the tag is not displayed on the page, but it is parsed by the browser.
The tag defines the syntax of the character set:
The charset attribute is used to specify the character encoding of the HTML document, such as adding the following statement to the tag:
You can set the character encoding of the document to "UTF-8".
Differences between HTML 4.01 and HTML5
The charset property is a new property in HTML5 and replaces:
The http-equiv attribute is still allowed to specify the character set, but using the new method can reduce the amount of code.
Common values for the charset property:
UTF-8-Unicode character coding
ISO-8859-1-character Encoding of the Latin alphabet
In theory, any character encoding can be used, but not all browsers can understand them. The more widely used a character encoding is, the more likely the browser is to understand it.
To see all available character encodings, visit the IANA character set.
Http://www.iana.org/assignments/character-sets
Extended knowledge: other uses of tags
1. Define the page description
Defining the description information of the page is beneficial to the search of search engines.
The tag defines the document title, and the name= "description" defines the document description, which is usually longer than the title.
2. Define keywords
Keywords are used to provide search engines with page-related information.
3. Define the author of the page
Author information can be extracted automatically through some content management systems.
4. Refresh the page
The code in the example above is used to send an instruction to the browser to automatically refresh the page after a specified interval of 30 seconds. In addition to specifying the time interval, you can also specify a link in the content attribute, where the page will be redirected to the page that the link points to after the specified time, as shown in the following example:
At this point, I believe you have a deeper understanding of "how to set the character set in html5". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.