<!DOCTYPE HTML><HTML> <Head> <title>03-CSS Selector. html</title> <Metaname= "Content-type"content= "text/html; CHARSET=GBK"> <!--<link rel= "stylesheet" type= "Text/css" href= "./styles.css" > - <!--Tag Selector: Tag name {} ID selector: #idname { Note: The value of an ID can only occur once. Class selector:. classname{} Note: class represents a category that can occur more than once. Pseudo-Class selector: Select a state of a label that needs to be used with other selectors. L: Not visited V: visited H: Suspension A: Active, click Combo selector: #one,. two,a{ The Unified settings Style - <styletype= "Text/css">P{Color:Yello; }#one{Color:Red; }. the{Color:Blue; }A:link{Color:Red; }a:visited{Color:Black; }a:hover{Color:Pink; }a:active{Color:Yellow; } </style> </Head> <Body> <P>This is my HTML page.</P><BR> <PID= "One">This is my HTML page.</P> <BR> <Pclass= "both">This is my HTML page.</P> <BR> <ahref= "e:/mycode/day01-html/css/01-combination mode. html"Target= "_blank">Come on</a> </Body></HTML>
1, a total of five kinds of selectors.
2, reasonable use of various selectors.
3, about pseudo-class selectors, according to the characteristics of each label to choose the appropriate properties.
css-Five kinds of selector