There are several ways to introduce css
This article shares with you several ways to introduce css. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
There are three ways to introduce CSS: inline style, internal style sheet, and external style sheet.
Incoming inline style of CSS
Use the style property to introduce the CSS style.
Example:
Application of style attribute
Styles set directly in the HTML tag
Actually, it is not recommended to use it when writing a page, but it can be used when testing.
For example:
Copy the code
Copy the code
Inline style
LeapingAboveTheWater
I'm the p tag.
Introduction of internal stylesheets for CSS
Write the CSS code in the style tag. The style tag is written in the head tag.
Example:
H4 {
Color:red
}
For example:
Copy the code
Copy the code
Internal style sheet
Div {
Background:green
}
I'm DIV.
Thank you for reading! This is the end of this article on "there are several ways to introduce css". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!