CSS style control page

Source: Internet
Author: User

1. Intra-row style.

Write the style between element tags.

<P style = "font-size: 24px; color: # aaafff"> Use CSS to control the intra-row style of the page style </P>

2. embedded

Write the style between the head and use <style> </style> to include it.

<Head> <style>

P {

Font-size: 24px;

}

</Style>

3. Link

The link is the most frequently used and practical method. The HTML code and CSS styles are completely separated. Both the early-stage artist and the later-stage maintenance are very convenient, and help the front-end and back-end developers simultaneously. Link only when style is used

<Link href = "demo.css" type = "text/CSS" rel = "stylesheet">

4. Pilot type

Similar to the link type, but the syntax is different. During HTML formatting, the pilot type imports CSS files as part of HTML. The effect is similar to that of embedded data. You can also import other style files in the CSS file.

<Style>

<Import url = "demo.css">

</Style>

Priority (highest-lowest ):

In-row style-"link type-" embedded type-"a" Guide type.

When designing a website, it is best to use the 1-2 method to facilitate later maintenance. Prevents style crashes.

Related Article

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.