What are the new specifications in html5?
The new specifications of html5 are: 1. Use two spaces to replace tab characters; 2. Nested elements should be indented once; 3. Add a doctype statement to the first line of each HTML page; 4. Specify the lang attribute for the HTML root element; 5. Specify the character encoding for the HTML page to ensure that the encoding of all documents is consistent, etc.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
New specifications for HTML5
(1) Syntax
Use two spaces to Instead of tabs - this is the only way to guarantee a consistent presentation in all environments.
Nested elements should be indented once (two spaces)
For attribute definitions, make sure to use double quotes and never use single quotes.
Do not add a slash at the end of self-closing and (self-closing) elements. --The HTML5 specification clearly states that this is optional.
Do not omit the optional closing tag (for example: or