CSS styles consist of selectors and declarations, and declarations are made up of attributes and values, such as p{font-size:12px;color:red;}
Comment syntax is/* Comment statement */
Inline CSS style is to write CSS code directly in the existing HTML tags, such as <p style= "color:red;font-size:12px" > here the text is red. </p>
Embedded CSS style is to write CSS code in the head of the <style type= "text/css" ></style> tags
The external CSS style is to write the CSS code in a separate external file, then in the head import <link href= "Base.css" rel= "stylesheet" type= "Text/css"/>
The priority of the three is the nearest principle
Selector type has tag Selector, class selector (with English dot plus class name), ID selector (with # Plus ID name), child selector (first generation child element with greater than sign to specify label), descendant selector (specifies the descendant element of the label with a space)
Pseudo-class selectors can set styles for a certain state of a label, such as A:hover{color:red;}, group selectors use commas to set the same style for multiple labels
An element can have multiple classes but only one ID
Some styles of CSS are inherited, but there are some CSS styles that are not inherited
A CSS style with high weights is used, the weight of the tag is 1, and the weight of the class selector is the 10,id selector with a weight value of up to 100
Cascading is the existence of multiple CSS styles for the same element, and when a style with the same weight exists, it is determined by the sequence of these CSS styles, and the CSS style at the very back is applied
Use!important to set the highest weights for some styles, such as p{color:red!important;}
Text layout, font font-family, font size font-size, colour color, bold font-weight:bold, italic font-style:italic, underline text-decoration:underline, Delete Line Text-decoration:line-through
Paragraph layout, indentation Text-indent:2em, line spacing line-height:1.5em, letter spacing letter-spacing, word spacing word-spacing, alignment text-align
Getting started with the front end (upper part of CSS)