How css uses the element Selector
This article mainly shows you "css how to use the element selector", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "css how to use the element selector" this article.
Element selector
Tag selector refers to using the HTML tag name as the selector, classifying according to the tag name, and specifying a unified CSS style for a certain type of tag in the page. The basic syntax format is as follows:
Tag name {attribute 1: attribute value 1; attribute 2: attribute value 2; attribute 3: attribute value 3;}
In this syntax, all HTML tag names can be used as tag selectors, such as body, H2, p, strong, and so on. The style defined with the tag selector is valid for all tags of that type on the page
For example:
H2 {color: # F00; font-size: 50px;} hyperlink Little Grey No.1 Little Grey No.2 Little Grey No.3
The biggest advantage of tag selector is that it can quickly unify the style for the same type of tags on the page, but this is also its disadvantage, it can not design differentiated styles.
These are all the contents of the article "how css uses element selectors". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!