Selector of style rules
HTML selector
Class selectorUsed to define a group of HTML elements with common functions or formats
ID selectorUsed to define a specific HTML element. JavaScript and CSS can manipulate and locate this specific HTML Tag based on this id value.
If you only need to set the format of a single element when a webpage is output on a certain media, you should use ID selector instead of inline style tables that directly set the style attribute of HTML elements.
After an embedded or linked style sheet is used in a webpage, You need to reset the corresponding style defined in the style sheet for the display effect of an element, inline style sheets are used to directly set the style attribute of HTML elements.
Association Selector
Combination Selector
For example, if the title in HTML uses the same style, you can combine the selector.
Pseudo element Selector