Home >Web Front-end >HTML Tutorial >Cascading style sheet CSS_html/css_WEB-ITnose
??
1. What is a cascading style sheet
css is to control the display of styles on web pages
2. Several ways to set css
inline Style sheet (Inline styles)
Set the style attribute of the tag
When using inline style sheets, the html4.01 standard recommends adding the following
Reason: The new version of html can not only use css but also use other methods, such as using text/sml to control the display effect of xml in html
Disadvantages: It needs to be set in each tag. Inline style sheets will work on all media
Embedded style sheets
Defined in the
Save the external style sheet in the buffer to speed up the loading of the web page
Advantages: It can make the web page slimmer
Input style sheet
You can use css The @import statement imports an external style sheet (css file) into two external css files. The style rule definition statements in the imported css
You can also use the @import statement to import a css file into the tag of the web page. The
style rule definition statement in the imported css file becomes tag pair.
An example statement using the @import declaration is as follows: