Notes from Chapter 1 of a Thorough Study of CSS Design
Important differences between XHTML and HTML1. Tag names must be lowercase in XHTML
2. Attribute names must be lowercase in XHTML
3. In XHTML tags must be strictly nested
4. In XHTML tags must be enclosed
5. In XHTML, even tags for empty elements are Must be enclosed
6. In XHTML, attribute values must be enclosed in double quotes
7. In XHTML, attribute values must use the full form
8. In XHTML, it should Distinguish between "content tags" and "structure tags"
Methods of introducing CSS in HTML
1. Inline
This is a line of Text.
2. Embedded
3 .Import
4. Link
Basic CSS selector
1. Tag selector: HTML tag
2. Category selector: .Category name
3. ID selector: #ID name
Composite selector
1. "Intersection" selector
div .special {……}
div #special {……}
2. “Union” selector
div, h1.first, p.special {……}
3. Descendant selector
div h1.first span.firstLetter{……}
4. Child selector (not supported by IE6 )
through Modify the tag style to generate a new style, and the style of the child tag will not affect the parent tag at all
The cascading feature of CSS
Priority rules: Inline style> ; ID style> Category style> Tag style