The basic labels for setting font styles are
Second, set the color of the text?
The color is
Code 4.7 font color setting: font_color.htm?
& lthtml & gt?
& lthead & gt?
& lttitle & gt font color setting
& lt/head & gt; ?
& ltbody & gt?
Light red text:
Crimson text:
Light green text:
Dark green text:
Light blue text:
Dark blue text:
Light yellow text:
Dark yellow text:
Light cyan text:
Dark cyan text:
Light purple text:
Deep purple text:
& lt/body & gt; ?
& lt/html & gt; ?
You can not only learn the usage of color attributes in font labels from code 4.7, but also be familiar with the representation methods of various colors. ?
Third, set the text size?
So is the size
Code 4.8 font size setting: font_size.htm?
& lthtml & gt?
& lthead & gt?
& lttitle & gt font size setting
& lt/head & gt; ?
& ltbody & gt?
The size is 1:
The size is 2:
The size is 3:
The size is 4:
The size is 5:
The size is 6:
The size is 7:
& lt/body & gt; ?
& lt/html & gt; ?
Try adding "+"and "-"characters before the size value to set the text size more flexibly. ?
Fourth, set the font of the text?
So is face.
Code 4.9 font font setting: font_face.htm?
& lthtml & gt?
& lthead & gt?
& lttitle & gt font font settings
& lt/head & gt; ?
& ltbody & gt?
The font is ì: < font size="5 "> Changsha Qinyuanchun-Mao Zedong. & ltbr/>; ?
The font is in regular script:
The font is bold:
The font is official script: < font size="5 "> Changsha Qinyuanchun-Mao Zedong. ?
& lt/body & gt; ?
& lt/html & gt; ?
5. oblique text?
With double labels
& lt me> This is italicized text.
& ltem & gt This is also italicized text.
Sixth, make the text bold?
With double labels
& ltb> This is bold text.
& ltstrong & gt this is also bold text.
7. Underline the text?
With double labels
Code 4. 10 Settings for text modification: font_style.htm?
& lthtml & gt?
& lthead & gt?
& lttitle & gt font decoration settings
& lt/head & gt; ?
& ltbody & gt?
& ltfont size="5 "> italics:
Bold:
Underline:
Italics are underlined in bold:
& lt/body & gt; ?
& lt/html & gt; ?
—Note: When multiple tags contain the same text, the order of inclusion cannot be misplaced. ?
Eight, the use of a variety of title styles?
An article on a web page has a special title style to highlight the importance of the title. HTML technology protects a set of style tags of titles, which are double tags.
Code 4. 1 1 Title setting: font_h.htm?
& lthtml & gt?
& lthead & gt?
& lttitle & gt setting of title
& lt/head & gt; ?
& ltbody & gt?
& lth 1 & gt; Title number 1 < /h 1 >?
& lth2 & gt title 2 < /h2 >?
& lth3 & gt Title 3
& lth4 & gt title 4?
Display mode of labels:&; lt; HTML & ampgt; & ltbr/>; ?
Display mode of quotation marks:&; Quot English half-width double quotation marks &; quot& ltbr/>; ?
Trademark display mode:&; Trade; & ltbr/>; ?
Display mode of registered symbols:&; reg& ltbr/>; ?
Display mode of copyright symbol:&; Copy; & ltbr/>; ?
Show & Sect; & ltbr/>; ?
Performance and time; ?
& lt/font & gt; ?
& lt/body & gt; ?
& lt/html & gt; ?
—Description: The symbol &; You must use the code &; amp。 ?
X. How to conveniently ignore the browser's parsing of some HTML?
If you make an HTML code example similar to this book in the web page, I'm afraid you'll have to convert everything into &; lt; And>, it seems more troublesome.
& lt plaintext & gt is a single tag. When it is inserted into the HTML code, all the HTML tags behind it will be invalid, that is, the browser is right.
& ltxmp & gt& lt/xmp & gt; Is a double tag, which only invalidates the tag in the content it contains.
Code 4. 13 Ignore label setting: html.htm?
& lthtml & gt?
& lthead & gt?
& lttitle & gt ignore the setting of labels.
& lt/head & gt; ?
& ltbody & gt?
& lth2 & gt Changsha Qinyuanchun
& ltxmp & gt independent cold autumn,
The eagle hits the sky,
& lt plain text & gt?
Take 100 couples who have traveled,
& lt/body & gt; ?
& lt/html & gt; ?
XI。 Other methods of text modification?
In order to meet the needs of different fields, HTML has other tags to modify the text. More commonly used are superscript format labels and subscript format labels. In some cases, you even need to use deletion effect, that is, you can use underlined tags in HTML. ?
—superscript format labels are double labels.
—Subscript format labels are double labels.
—The underlined label is a double label.
Create a web page file named other.htm in the D:\web\ directory, and write the code as shown in code 4. 14. ?
Code 4. 14 other decorative label settings: other?
& lthtml & gt?
& lthead & gt?
& lttitle & gt setting of other decorative labels
& lt/head & gt; ?
& ltbody & gt?
& ltfont size="5 " >?
Qin; Changsha! & ltbr/>; ?
Representation of mathematical index: 2
Qin; Changsha. ! & ltbr/>; ?
Representation of Mathematical Basis: Logarithm
Delete effect:
& lt/font & gt; ?
& lt/body & gt; ?
& lt/html & gt; ?