3 Style Sheets
Internal style sheet
<style type= "Text/css" >......</style> define different selectors in External style sheet Application
Create a new style sheet file that expands to be called CSS
In CSS style sheet files, you can write different selectors
In a Web page, use the <link/> tag to connect to an external style sheet file
In the corresponding HTML tag, use the id= "id" selector name class= the "class" selector name
<link href= "file Address" rel= "stylesheet" style= "Text/css"/>
Inline style sheet
Using inline style sheets is not recommended
In the corresponding HTML tag, add the Style= "property: Value;"
3 Types of selectors
Tag Selector, automatically applied to the corresponding HTML tag in the Web page
Class Selector, you must add the Class=class selector name in the HTML tag
ID Selector, you must add the Id=id selector name in the HTML tag
Second, the advanced application of CSS--composite Selector
1. Descendant Selector PS: tags that apply only to HTML cannot begin with. Or # # PS: The outer layer must be an HTML tag (any of 3 selectors). or # Start
Syntax: Markup inside the outer HTML tag {attribute: value} 2 tag names must have a space
2. Intersection Selector
Syntax: Consisting of two selectors, the first must be a tag selector,
The second must be a class selector or an ID selector, with no spaces in 2 selectors
Mode 1.
HTM tag name. class Selector Name {property name: value;}
Mode 2.
HTM tag name #id selector name {property name: value;}
3. Set selector--Very wide application
Selector 1, selector 2, selector 3, selector 4 ... Selector n{properties: values;.} all use these attributes,
CSS Supplemental information in HTML