How to write CSS code:

Source: Internet
Author: User

How to write CSS code:
The first: Write CSS code in the Style tab. Can only be used on this page, reusability is not strong.
Format:
<style type= "Text\css" >
Code to write CSS.
</style>
Example:
<style type= "Text\css" >
a{
Color: #F00;
Text-decoration:none;
}
</style>
The second type: you can introduce external CSS files. Recommended use.
Mode 1: use the link tag. Recommended Use ...
Format:
<link href= "path to CSS file" rel= "stylesheet" >
Example: <link href= "1.css" rel= "stylesheet"/>
Mode 2: use <style> introduce
Format:
<style type= "Text/css" >
@import URL ("path to CSS");
</style>
Example:
<style type= "Text/css" >
@import url ("1.css");
</style>
The third Way: write directly in the HTML tag using the Style property. Can only be used in this label, the reusability is poor. It is not recommended.
Example:
<a style= "color: #0F0; Text-decoration:none "href=" # "> Title 1</a>

How to write CSS code:

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.