I. Overview of HTML text tags
- ...
-Multiple spaces or tabs are compressed into a single space, that is, only one space is displayed
(2) Special characters (such as spaces) that need to be escaped (using character entities)
code:<! DOCTYPE html><body> the <p> element. © Jason.</body>
Show Results:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7D/77/wKioL1bpHyLiaFCoAAATCEifwqs813.png "title=" Web.png "alt=" Wkiol1bphyliafcoaaatceifwqs813.png "/>
Ii. Use of text markers
Text Style
(1) The function of text style is to modify the text, such as bold, tilt, etc.
-<b>...</b>: Bold
-<b>...</b>: Tilt
-<b>...</b>: Underline
-<b>...</b>: Strikethrough
-<b>...</b>: superscript
-<b>...</b>: subscript
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7D/77/wKioL1bpH9yiCQ4RAADznAmLL18459.png "title=" Web.png "alt=" Wkiol1bph9yicq4raadznamll18459.png "/>
Title Elements
(1) The title element makes the text appear in an eye-catching way, often used for the title of the article
(2) Basic grammar:
-# = 1,2,3,4,5,6
-From
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7D/78/wKioL1bpIHjQV2hVAAESrsLc5Bs169.png "title=" Web.png "alt=" Wkiol1bpihjqv2hvaaesrslc5bs169.png "/>
Paragraph elements <p>
(1) <p> elements provide a way to structure text
(2) The text in the <p> element is displayed in a separate paragraph
-line breaks apart from the text before and after
-Add an extra vertical gap distance as paragraph spacing
-Common properties: Align
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7D/7A/wKiom1bpIMiC8jxKAAEFci_U85o981.png "title=" Web.png "alt=" Wkiom1bpimic8jxkaaefci_u85o981.png "/>
Line wrapping Elements <br>
(1) Use <br> elements to create a manual wrap anywhere.
-Empty Tag
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7D/7A/wKiom1bpIQfjiZ2GAAEniouLjjA441.png "title=" Web.png "alt=" Wkiom1bpiqfjiz2gaaeniouljja441.png "/>
Partitioning elements <span> and <div>
(1) Partitioning elements are used to group elements, often for page layouts
(2) block partition element:<div></div>
(3) Intra-row partition element:<span></span>
-Set different formats within the same line of text
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7D/7A/wKiom1bpIaGDOsXsAAFOpRfrqio513.png "title=" Web.png "alt=" Wkiom1bpiagdosxsaafoprfrqio513.png "/>
Inline elements and block-level elements
(1) block-level elements
-By default, block-level elements will have a single line, that is, the element will wrap before and after the elements
-such as: <p>, <div>,
(2) Inline elements
-No line break, can be on the same line as other inline elements
-such as: <span>, <b>, <i>, <u>
Split Line Elements
(1)
-Empty Tag
-often used to separate different parts of a page
-The text behind the
(2) Common Properties
-Size, width, align, color
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7D/78/wKioL1bpIzbzmG1XAADaexxILU8310.png "title=" Web.png "alt=" Wkiol1bpizbzmg1xaadaexxilu8310.png "/>
Pre-formatted <pre>
(1) Preserves formatting in the source document, which preserves the original line breaks and whitespace in the text
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7D/7B/wKiom1bpIv2S1uFwAAEJEp0hXus848.png "title=" Web.png "alt=" Wkiom1bpiv2s1ufwaaejep0hxus848.png "/>
Summary: This chapter focuses on HTML text markup.
This article from the "Technical Exchange" blog, declined reprint!
HTML5 base -4 HTML text