Selector:
Tag Selector
p{
Background-color:purple;
}
Class Selector
. one{
color:red;
}
ID Selector
#a {
font-size:25px;
}
Inline style:
<p style= "Color:blue;" > </p>
Link an external style sheet with the address one.css.
<link rel= "stylesheet" type= "Text/css" href= "One.css"/>
Import the external style sheet with the address one.css.
<style>
@import url ("One.css");
</style>
Descendant selector:
OL li{
}
The set selector:
p,input,h1{
}
Common font properties (set font type, size, style, weight).
font-family font-size Font-style Font-weight
Common text properties (set text color, set element horizontal alignment, set indentation for first line of text, set the height of lines, set text decorations)
Color Text-align text-indent line-height text-decoration
Tag Selector: The xx label in the page is used. Style
Class Selector: Different tags can use the same class value
ID selector: must be unique ID number cannot be duplicated
Priority: ID Selector > class selector > tag Selector
Priority: Inline style > Inner style > External style
font-style:italic;/* Italic */
font-weight:bold;/* Bold */
text-align:center;/* Text Horizontal Center */
text-decoration:none;/* Not underlined */
text-decoration:underline;/* is underlined */
text-indent:20px;/* first Line indent 20 pixels */
Developing commercial sites using HTML language and CSS (4)