HTML Learning Notes (iv)

Source: Internet
Author: User

1. CSS inline style issues to note:

A) The Style keyword is written in the label as a property of the label;

b) The equal sign is followed by a pair of double quotation marks containing the contents;

c) The style attribute is separated from the property by a good score in English.

2. Common property sheet:



3. Depending on the location of the style code, it can be divided into three categories:

A) in-line style;

b) inline style;

c) External style.

4. It is a good practice to add a semicolon after the last declaration (the style's property row).

5. When you embed a style, the style tag must be written in the head tag.

6. When defining the class selector name, be sure to add a dot (.) to the class selector in the body, using the keyword class.

7. When defining the ID selector name, be sure to add the pound sign (#) and use the keyword ID when using the ID selector in the body.

8. We click on the CSS style bar in Dreamweaver and click on "link external style sheet" to link to an external style file by selecting link or import.

For example:

<linkhref= "Css/mystyle.css" rel= "stylesheet" type= "Text/css"/>

Or is:

<style type= "Text/css" >

<!--

@import url ("Css/mystyle.css");

-

</style>

9. Special selectors:

<styletype= "Text/css" >

a{/* Set hyperlink not underlined, text-decoration for text decoration */

Color:blue;

Text-decoration:none;

}

a:hover{/* The mouse hovers over the hyperlink with a dash */

color:red;

Text-decoration:underline;

}

a:active{/* Active link, color is green, not underlined */

Color:green;

Text-decoration:none;

}

</style>

10. For an HTML tag:

1) If there are multiple styles, if the specified style does not conflict, then overlay;

2) If there is a conflict, the first consideration of the inline style sheet display, if not, and then consider the embedded style display, if not, and finally use the outside style sheet display, otherwise in the HTML default style display;

11. The DIV uses Z-index to indicate which layer to occupy.


HTML learning Note (iv)

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.