CSS in HTML detailed description

Source: Internet
Author: User

I. The role of style sheets
1. CSS style sheets, cascading style sheets
2, similar to human clothing, web-clothes
3. Function: Beautify Web page
4. Advantages:

1. Separation of content and performance for easy maintenance
2. Rich style, flexible page layout
3. Improve page access speed and reduce network bandwidth
4. Helpful to be included in SEO
Ii. Types of Style sheets
1. Inline style sheet 2. Internal style sheet--written in the <style> tab of <style type= "Text/css>" Selector (attribute: value)
3. External style sheet
Separate extension of files named CSS
In the file, write the selector directly.
In a Web page, a style sheet that joins an external extension expands a file named CSS P103 <link type= "text/css" rel= "stylesheet" HRE table file/>
Iii. syntax for CSS tables
The name of the selector {The property of the Web page: value; ...}
1. Tag Selector--html tag
1. The label of the page that will automatically apply
2. class Selector--. Selector Name {property: value}
In the HTML tag where you want to apply the selector, add the attribute value
3.ID Selector--#选择器名 {property: Value}

Iv. style sheets and selectors are preferred
Inline style > Internal style sheet > external style sheet id> class selector > label

CSS in HTML detailed description

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.