Developing commercial sites using HTML language and CSS (4)

Source: Internet
Author: User
Tags unique id

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)

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.