First write CSS + HTML, first csshtml
The first time I wrote CSS + HTML, it was quite entertaining,
The itinerary for D, G, Z, J, and S.
How to Write css in html? What is the format?
Style Syntax: Selector {property: value}
How to add a style sheet to Your webpage:
You can add a style sheet to Your webpage in the following three ways. The higher the style definition priority that is closest to the target. The high-priority style inherits the non-overlapping definition of the low-priority style but overwrites the overlapping definition. For exceptions, see! Important Declaration.
Inline Styles
Inline definition is to use the style attribute Definition of the object within the object tag to apply its style table attribute.
Sample Code:
<P style = "color: # f00"> the font color of this line is red. </p> the internal Style Block object Embedding a style Block
You can insert a <style> block object in the
Sample Code:
<Style>
Body {background: # fff; color: #000 ;}
P {font-size: 14px ;}
</Style> external Style Sheet Linking to a style Sheet
You can first create an external style sheet file *. css and then use the link object of HTML.
Sample Code:
<Link rel = "stylesheet" href = "*. css"/>
How to write this html code? (Use css)
<Style type = "text/css">
H1 {font-size: 14px; color: red; font-family: "文 "; text-algin: center ;}
P {text-indent: 25px; ling-height: 25pt; letter-spacing: 03pt ;}
P span {color: green; font-family: "", "italic ";}
A: link {color: red; text-decoration: none ;}
A: hover {color: blue ;}
</Style>
<H1> Level 1 title
<P> <span> two Chinese characters are indented at the beginning of the text section, and the spacing </span> is indented at the beginning of the text section. </p>
<A href = #> link </a>