Some ways to use CSS in HTML are introduced

Source: Internet
Author: User

There are several ways to use CSS in HTML:
The importance of CSS we will not say, add no CSS, the page may display a dull, or even no aesthetics, the following is a brief introduction of the use of CSS in HTML several ways, hoping to bring some help to beginners.
I. Introduction of external style sheets:

<type= "text/css"  href= "css/style.css"/>

The above code can be introduced in the sibling directory, CSS folder named Style table file, this path can be a relative path can also be an absolute path.

For a path You can refer to the relative path and absolute path usage in the detailed section.

Two. In-Document style sheets:

<styletype= "Text/css">. Test Li{Margin-top:20px;List-style:None;}</style>

The above code uses
Declares a style sheet within a document, with style rules written between two labels.
Three. Write the style in the label:

<style= "width:100px;" ></ Div >

The above code sets the width value of the div directly within the DIV using style.

The original address is: http://www.51texiao.cn/HTML5jiaocheng/2015/0521/2135.html

Some ways to use CSS in HTML are introduced

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.