Html css style sheets and htmlcss Style Sheets
CSS (Cascading Style Sheet) is used to beautify HTML webpages.
/* Comment area */This is the comment syntax
I. Style Sheets
(1) classification of Style Sheets
1. inline Style Sheets
Combined display with HTML, precise control, but poor reusability, more redundancy.
Example: <p> inline style sheet </p>
2. Embedded Style Sheets
As an independent area embedded in the web page, it must be written in the head label.
<Style type = "text/css">
P // The format takes effect on the p tag.
3. External Style Sheets
Create a new CSS file to place the style sheet. To call a style sheet in an HTML file, right-click the style sheet in the HTML file, select CSS style sheet, and append the style sheet. Link connection is generally used.
Some labels have default margins. Generally, the style sheet code is removed first (other styles can be set), as shown below:
1. Tag selector. Use the tag name as the selector.
2. class selector. All begin.
3. ID selector. It must start.
<Div id = "style name">
4. Compound Selector
(1) separated by commas (,), indicating the parallel operation.
(2) Use spaces to separate the child.
(3) filter ".".
Ii. style attributes
(1) Background and prospects
2. Foreground Font:
(2) border and border
Border (Table border, style, etc.) and margin (outer table spacing ). Padding (content and cell spacing ).
(3) List and square
Width, height, (top, bottom, left, right) are only useful in absolute coordinates.
A: The status before the link hyperlink is clicked
A: status after clicking the visited hyperlink
A: When hover is hovering over a hyperlink
A: When a hyperlink is clicked on the active node
When defining these States, there is an order of l v h