Home >Web Front-end >CSS Tutorial >Use CSS Selectors Cleverly_Experience Exchange
Link styles in different content blocks can be defined through different rules. Something like this: #nav a:link or #main a:link or #footer a:link. You can also define different styles for the same elements in different content blocks. For example, define the styles of #main p and #sider p respectively through #main p and #sider p. Structurally speaking, your page is composed of pictures, links, lists, paragraphs, etc. These elements themselves do not affect which network device they are displayed on (PDA, mobile phone or Internet TV). They can be defined as Any performance appearance.
A carefully structured HTML page is very simple, and every element is used for structural purposes. When you want to indent a paragraph, you don't need to use the blockquote tag. Just use the p tag and add a CSS text-indent rule to p to achieve the indentation purpose. p is a structured tag and text-indent is a presentation attribute. The former belongs to HTML and the latter belongs to CSS. (This is the legendary separation of structure and performance)
There are almost no performance attribute tags in a well-structured HTML page. The code is very clean and concise. For example, the original code