How to import CSS
- css has three style sheets
- inline style sheet (inline style)
- Internal style sheets (embedded)
- External Style Sheets (Linked)
- Extract the CSS code and put it in the style tag
- Theoretically style can be placed anywhere, but by default it is placed in the head
- Just add the attribute style directly to the tag
- Code sample:
<p style="color: pink; "></p>
- style is a label attribute, which can only control the current label
-
use more methods
-
Write a separate css page externally
-
Steps
- Create a new .css file
- Write what was written in the style tag before in the css file
- Write tags in the head of the HTML page
<link>
to introduce this page
<link rel="stylesheet" herf="css路径">