Semantic tags should pay attention to some issues: 1. Use as few as possible non-semantic tags div and span; 2. Do not use pure style tags, such as B, font, and u. Use css settings instead. The text to be emphasized in semantics can be in the strong or em tag ....,.
1. Make transparent results
Opacity: 0.7;
Filter: alpha (opacity = 70 );
2. Another method to clear the floating layer
. Clearfix: after {
Content :".";
Display: block;
Height: 0;
Clear: both;
Visibility: hidden;
}
. Clearfix {
Display: inline-block;
}
* Html. clearfix {height: 1% ;}
. Clearfix {display: block ;}
3. p-block-level element Separator
The area delimiter of the element in the span row.
When the labels on the page cannot meet the design requirements, the non-semantic labels such as p and span will be added as appropriate for implementation.
4. Tag semantics:
The search engine does not see the visual effect. It only sees the code and can only identify the meaning of the content through tags.
5. Notes for semantic tags:
- Use as few non-semantic tags as possible p and span;
- Do not use pure style labels, such as B, font, and u. Use css settings instead. The text to be emphasized in semantics can be in the strong or em tag.
DTD: Document Type Definition (standard mode and weird Mode)
Standard mode: the browser displays the page according to the specifications.
Weird mode: It usually simulates the behavior of an old browser to prevent the old site from working. (Width contains the width of padding and border. margin: auto; cannot work normally)
If the DTD declaration is missing, Firefox will still parse the webpage in the standard mode, but in IE (including IE6 \ IE7 \ IE8) it will trigger the weird mode.
6. CSS reset:By redefining the label style, "Overwrite" the default style provided by the browser
7. modular CSS
Do not include the same part between modules. If the same part exists, extract it and split it into an independent module.
The module should be as simple as possible to improve reusability under the principle of ensuring as few as possible.
8. CSS naming
The Hump naming method is used to distinguish different words, and a line is used to indicate subordination.