CSS code introduction and Basic Selector

Source: Internet
Author: User

Introduction

CSS features: render layouts for HTML elements

1. Find the Label element

2. Action label (plus CSS properties)

Consists of two main components: selectors, and multiple declarations

====================================

How CSS code is introduced

One, inline (does not involve lookup, with HTML binding, difficult to maintain)

<p style= "color:red;font-size:24px" >hello world</p>

Second, embedded: Head tag embedded style tag

Selector Selector

Tag Selector

ID selector highest Priority #

Class selector.

Universal Selector *

Selector priority

Combo Selector

Third, file-linked (project selection)

Add link tag link to separate CSS file in head tag

<link rel= "stylesheet" href= "Index.css" >

CSS code introduction and Basic Selector

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.