CSS Supplemental information in HTML

Source: Internet
Author: User

3 Style Sheets
Internal style sheet
<style type= "Text/css" >......</style> define different selectors in External style sheet Application
Create a new style sheet file that expands to be called CSS
In CSS style sheet files, you can write different selectors
In a Web page, use the <link/> tag to connect to an external style sheet file
In the corresponding HTML tag, use the id= "id" selector name class= the "class" selector name

<link href= "file Address" rel= "stylesheet" style= "Text/css"/>
Inline style sheet
Using inline style sheets is not recommended
In the corresponding HTML tag, add the Style= "property: Value;"
3 Types of selectors
Tag Selector, automatically applied to the corresponding HTML tag in the Web page
Class Selector, you must add the Class=class selector name in the HTML tag
ID Selector, you must add the Id=id selector name in the HTML tag

Second, the advanced application of CSS--composite Selector
1. Descendant Selector PS: tags that apply only to HTML cannot begin with. Or # # PS: The outer layer must be an HTML tag (any of 3 selectors). or # Start
Syntax: Markup inside the outer HTML tag {attribute: value} 2 tag names must have a space
2. Intersection Selector
Syntax: Consisting of two selectors, the first must be a tag selector,
The second must be a class selector or an ID selector, with no spaces in 2 selectors
Mode 1.
HTM tag name. class Selector Name {property name: value;}
Mode 2.
HTM tag name #id selector name {property name: value;}

3. Set selector--Very wide application
Selector 1, selector 2, selector 3, selector 4 ... Selector n{properties: values;.} all use these attributes,

CSS Supplemental information in HTML

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.