Internal style sheet
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
p {
text-indent: 2em;
line-height: 26px;
}
</style>
</head>
Copy the code
Inline style sheets
<div style="color: red; font-size: 12px;">111</div>
Copy the code
Style is the attribute of the tag
External style sheets
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="CSS file path">
</head>
Copy the code
- Rel: Defines the relationship between the current stability and the linked document, in this case specifying “stylesheet” to indicate that the linked document is a stylesheet file
Chrome Debugger
If there is a style, but it is preceded by a yellow exclamation mark, it is a style property typo