Selector for style rules

Source: Internet
Author: User

HTML Selector

Class Selector used to define a set of common functions or formats. HTML Elements


ID Selector used to define a specific HTML element, JavaScript and the CSS can be based on this ID value to manipulate and locate this particular HTML tags.

< style >

<!--

#yellowone

{

color:Yellow

}

-

</ style >

If a single element needs to be formatted when the page is output only on a certain medium, you should use the ID selector instead of the style that directly sets the HTML element. the inline style sheet for the property.

When you use an embedded and linked style sheet in a Web page, the display of an element needs to be re-set for a defined correlation style in the style sheet, using an inline style sheet to directly set the style property of the HTML element .

Association Selector


Combo Selector

If you use the same style for headings in HTML, you can combine selectors


Pseudo element Selector

Selector for style rules

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.