1. All letters are written in lower case.
2. ID and class must start with a letter
3. All labels must be closed
E.g. <p> </P>
4. indent HTML tags with the tab key. Pay attention to the Code to facilitate self-check and viewing by others.
5. attribute values must be enclosed in quotation marks.
E.g. <span id = "hello"> </span>
6. html comments
<! -- Use on the left <! --, Use --> on the right. There must be a space gap between the comment content and the symbol --> <! -- <Div> <p> Hello World ~~~ </P> </div> -->
[Note] a space between the comment content and the comment symbol must exist. If it is omitted, it is mistaken that all of the following are comments.
7. CSS comments
// When the line comment uses a two-slash, a space is added between the slash and the comment content //. NAV {width: 960px; Height: 70px; margin: 0 auto ;}//. content {width: 500px; Height: 500px; float: Left ;}//. sidebar {width: 460px; Height: 400px; margin: 0 autofloat: Right ;}
8. Div cannot be nested in tags with parent-child relationships in UL Li ol Li dl dt dd.
Cause: an error occurs in JS. It is found in the form of a node. If a div is inserted, it cannot be found.
The following code is incorrect:
<ul> <li></li> <div></div> </ul>
9. Fast attribute labels cannot be nested in p dt h labels.
Reason: block tags cannot be contained
10. A labels cannot be nested
11. inline elements cannot be nested with block-level elements (this specification only exists in W3C specifications)
12. inline elements do not support width and height. If you want inline elements to support width and height, you can use display: block or display: inline-block;
Front-end specifications (I)