HTML style Sheet

Source: Internet
Author: User

@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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.