HTML Study Notes (4), html Study Notes
1. Notes for css inline style:
A) The style keyword should be written in the tag as an attribute of the tag;
B) The equal sign is followed by a pair of double quotation marks;
C) The Style attributes and attributes are separated by good scores in English.
2. Common attribute tables:
3. According to the position of the style code, there are three types:
A) Intra-row style;
B) embedded styles;
C) external style.
4. Adding a semicolon after the last declaration (attribute row of the style) is a good habit.
5. When embedding a style, the style label must be written in the head label.
6. When defining the class selector name, you must add a dot (.) before using the class selector in the body.
7. When defining the id selector name, you must add the id (#) in front. When using the id selector in the body, use the keyword id.
8. Click the css style bar in dreamweaver and click link external style sheet. You can select link or import to link to an external style file.
For example:
<Linkhref = "css/mystyle.css" rel = "stylesheet" type = "text/css"/>
Or:
<Style type = "text/css">
<! --
@ Import url ("css/mystyle.css ");
-->
</Style>
9. Special selector:
<Styletype = "text/css">
A {/* set the hyperlink without underline. text-decoration indicates text modification */
Color: blue;
Text-decoration: none;
}
A: hover {/* dashes the line when the mouse is suspended over the hyperlink */
Color: red;
Text-decoration: underline;
}
A: active {/* When the link is active, the color is green and does not contain underscores */
Color: green;
Text-decoration: none;
}
</Style>
10. For an HTML Tag:
1) if there are multiple styles and the specified styles do not conflict with each other, they are superimposed;
2) If there is a conflict, first consider the display of the intra-row style table. If not, consider the embedded style display. If not, use the external style table display, otherwise, it will be displayed in the default HTML style;
11. Use z-index in Div to indicate the layer occupied.