1. Inline style
1. Example:
2. Effect:
It is only valid for this
2. Inline Embedded
1. Sample:
h1
{
color:wihite;
backgroud-color:blue;
}
2. Effect:
All
3. Imported
Example:
@import "mycss.css";
4. Link style
Example:
5. The difference between import type and link type:
1. There is not much difference between the two. Import type It is implemented by the CSS specification, and the link type is implemented by the HTML specification;
2. The import type loads the CSS file after the web page is loaded, and the link type loads the CSS file before the web page is loaded;
The above is the detailed content of Introduction to four ways to introduce CSS into HTML. For more information, please follow other related articles on the PHP Chinese website!