Introduction method: Write the CSS code in the "
" header tag of the HTML document, and define it with the " ".
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
CSS is used to modify web page styles. However, if you want the styles modified by CSS to work, you must introduce a CSS style sheet into the html file. There are three common ways to introduce style sheets, namely inline, embedded, and external links. The following article will give you a detailed introduction to embedded.
CSS Embedded
Inline is to write the CSS code in the
header tag of the HTML document, and useIn this syntax, the
使用style标记可定义内嵌式CSS样式表,style标记一般位于head头部标记中,title标记之后。
Inline CSS styles are only valid for the HTML page in which they are located. Therefore, when designing only one page, using inline is a good choice. But if you are on a website, it is not recommended to use this method because it cannot take full advantage of CSS code reuse.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of How to use inline to introduce css style sheet. For more information, please follow other related articles on the PHP Chinese website!