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