In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this article, the editor introduces in detail the "what new specifications have been added to html5" with detailed content, clear steps and proper handling of details. I hope that this article "what new specifications have been added to html5" will help you solve your doubts.
Html5 new specifications are: 1, with two spaces instead of tabs; 2, nested elements should be indented once; 3, the first line of each HTML page to add doctype declaration; 4, for the html root element to specify the lang attribute; 5, the HTML page to specify character encoding to ensure that all documents are encoded consistently, and so on.
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
New specifications for HTML5
(1) Grammar
Replace tabs (tab) with two spaces-this is the only way to ensure a consistent presentation in all environments.
Nested elements should be indented once (two spaces)
For the definition of attributes, make sure that all use double quotation marks, never use single quotes.
Do not add a slash to the tail of the autistic and (self-closing) elements. The HTML5 specification makes it clear that this is optional.
Do not omit the optional closing tag (for example: or)
HTML5 doctype: add a standard mode (standard mode) declaration to the first line of each HTML page to ensure a consistent presentation in each browser.
(2) language attributes
According to the HTML5 specification, it is strongly recommended that you specify the lang attribute for the html root element to set the correct language for the document, help the speech synthesis tool determine the pronunciation it should adopt, help the translation tool determine the rules that the translator miniature follows, and so on.
(3) character coding
By declaring character encoding, you can ensure that browsers can quickly and easily determine the rendering of page content, which avoids the use of character entity tags in HTML, so that they are all consistent with document encoding (usually UTF-8 encoding)
(4) introducing CSS and JavaScript files
You do not need to specify the type attribute when introducing CSS and JavaScript files, and text/css and text/javascript are their default values, respectively.
(5) attribute order
The HTML attributes should be arranged in the order given below to ensure the readability of the code
Clss > id,name > data-'' > src,for,type,href,value > title,alt,role.
(VI) boolean type attribute
Boolean properties can be declared without a value. The XHTML specification requires that it be assigned to it, but the HTML5 specification does not.
After reading this, the article "what new specifications have been added to html5" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, you are welcome to follow the industry information channel.
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.