Overall declaration of CSS beginner page styles

Source: Internet
Author: User

Overall statement method
1. Basically, there are two methods for the overall Declaration. The first method is to set several styles at a time for a tag. The second is to set the same style for several labels at the same time. The following example shows how to set several styles at a time for a tag ":

The code is as follows: Copy code
<Stype = "text/CSS">
Body {font-size: 9pt;
Font-color: red;
Background: white}
</Style>

2. we also declare the following styles: the size of the glyphs is 9pt, the color of the glyphs is red, and the background is white. To separate these three styles, we use semicolons (;) to separate them so that they can work normally! Of course, if you think it is a waste of space to write such a column, you can also write it as a row, as shown below:

The code is as follows: Copy code
<Style type = "text/css">
Body {font-size: 9pt; font-color: red; background: white}
</Style>

Set the same style for several labels
1. We have just seen a tag and set several styles at the same time. In fact, we can also set several tags together, for example:

The code is as follows: Copy code
<Style type = "text/css">
H1, h2, td {font-size: 12pt; font-color: red; font-family:}
</Style>

In this example, three groups of labels

Related Article

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.