@charset "Utf-8";/* CSS Document */*/* All tags work, margins and spacing are set to 0px*/{ margin:0px; padding:0px;} P,span /* Directly write a label name, indicating that all P tags perform this style */{ background-color: #F6C; Color: #0F0;} p.sp{ background-color: #FF0; color:red; font-size:36px;}. Main/* begins with a., use class to refer to this style sheet */{ height:50px; width:300px; Background-color: #0FF; font-size:45px;}. The main p/* indicates that if there is a P tag in the class=main tag, the */{width:400px is executed ; font-size:36px;} #main/* Starts with # and uses the ID selector to refer to this style sheet */{ height:60px; width:500px; Background-color: #60C; font-size:36px;} A:link
With style sheets, we can control the font size, format, color, etc. displayed in HTML
<styletype= "Text/css"></style><Linkhref= "Untitled-1.css"rel= "stylesheet"type= "Text/css" /></Head><Body><Divstyle= "Background-color: #0F0">1234567</Div><P>Spring has come.</P><P>The flowers are open and the grass is green.</P><Pclass= "SP">Goose Goose Goose, the song item to the heavenly songs.</P><spanclass= "Main">Hoe wo Day Copse<P>Sweat wo xia tu</P></span><Pclass= "Main">The day depends on the mountain</P><PID= "Main" >Moon Light in front of the bed</P><span>Suspected ground frost.</span><BR/><ahref= "http://www.baidu.com/">Baidu a bit</a></Body></HTML>
We refer to the style sheet in the HTML tag, which is the effect
Div occupies one line by default, and span is how much it takes
HTML style Sheet