There are several ways to use CSS in a Web page:
CSS in the current page can be said to be necessary, if not the use of CSS, then this page is generally ugly unimaginable, the following introduction to the Web page using several ways of CSS, I hope to be helpful to beginners.
One. Inline style:
The so-called inline style is the style that unloads the tag, with the following code:
<style= "color:red;font-size:10px"></div>
That is, use style to specify the style of the div within the tag.
Two. Internal style sheet:
The so-called internal style sheet is that the style sheet is written on the current page instead of being introduced externally, with the following code:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.51texiao.cn/" /><title>Ant Tribe</title><styletype= "Text/css">. Demo{width:200px;Height:200px;background:Green;}</style> </Head><Body> <Divclass= "Demo"></Div></Body> </HTML>
The code above uses <style type= "TEXT/CSS" ></style> prescribes an internal style sheet.
Three. external style sheet:
The external style sheet corresponds to the internal style representation, which is the introduction of an external style sheet file on the current page, rather than unloading the current page with the style code.
<href= "Css/style.css" rel= "stylesheet" type= " Text/css "/>
The original address is: http://www.51texiao.cn/HTML5jiaocheng/2015/0613/4140.html
The original address is: http://www.softwhy.com/
There are several ways to use CSS in Web pages to simply introduce