I. The role of style sheets
1. CSS style sheets, cascading style sheets
2, similar to human clothing, web-clothes
3. Function: Beautify Web page
4. Advantages:
1. Separation of content and performance for easy maintenance
2. Rich style, flexible page layout
3. Improve page access speed and reduce network bandwidth
4. Helpful to be included in SEO
Ii. Types of Style sheets
1. Inline style sheet 2. Internal style sheet--written in the <style> tab of <style type= "Text/css>" Selector (attribute: value)
3. External style sheet
Separate extension of files named CSS
In the file, write the selector directly.
In a Web page, a style sheet that joins an external extension expands a file named CSS P103 <link type= "text/css" rel= "stylesheet" HRE table file/>
Iii. syntax for CSS tables
The name of the selector {The property of the Web page: value; ...}
1. Tag Selector--html tag
1. The label of the page that will automatically apply
2. class Selector--. Selector Name {property: value}
In the HTML tag where you want to apply the selector, add the attribute value
3.ID Selector--#选择器名 {property: Value}
Iv. style sheets and selectors are preferred
Inline style > Internal style sheet > external style sheet id> class selector > label
CSS in HTML detailed description