What are the html5 text control tags?
html5 text control tags include: 1. Title tags (h1, h2, h3, h4, h5, h6); 2. Paragraph tags (p); 3. Horizontal line tags (hr); 4. Line break tags (br); 5. Text formatting tags (b, strong, i, em, s, del, u, ins); 6. Special character tags.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
html5 text control tags
1, title and paragraph tags
一Articles with a clear structure usually have titles and paragraphs, and HTML web pages are no exception. In order to display the text in the web page in an orderly manner, HTML provides corresponding tags.
(1) Title tag
In order to make the web page more semantic, title tags are often used in the page. HTML provides 6 levels of titles. That is,
, , , , and , with decreasing importance from to . <h1>这是标题 1</h1>
<h2 id="这是标题-nbsp">这是标题 2</h2>
<h3 id="这是标题-nbsp">这是标题 3</h3>
<h4 id="这是标题-nbsp">这是标题 4</h4>
<h5 id="这是标题-nbsp">这是标题 5</h5>
<h6 id="这是标题-nbsp">这是标题 6</h6>
Copy after login
, , and , with decreasing importance from to . <h1>这是标题 1</h1>
<h2 id="这是标题-nbsp">这是标题 2</h2>
<h3 id="这是标题-nbsp">这是标题 3</h3>
<h4 id="这是标题-nbsp">这是标题 4</h4>
<h5 id="这是标题-nbsp">这是标题 5</h5>
<h6 id="这是标题-nbsp">这是标题 6</h6>
Copy after login
and , with decreasing importance from to . <h1>这是标题 1</h1>
<h2 id="这是标题-nbsp">这是标题 2</h2>
<h3 id="这是标题-nbsp">这是标题 3</h3>
<h4 id="这是标题-nbsp">这是标题 4</h4>
<h5 id="这是标题-nbsp">这是标题 5</h5>
<h6 id="这是标题-nbsp">这是标题 6</h6>
Copy after login
to . <h1>这是标题 1</h1>
<h2 id="这是标题-nbsp">这是标题 2</h2>
<h3 id="这是标题-nbsp">这是标题 3</h3>
<h4 id="这是标题-nbsp">这是标题 4</h4>
<h5 id="这是标题-nbsp">这是标题 5</h5>
<h6 id="这是标题-nbsp">这是标题 6</h6>
Copy after login
<h1>这是标题 1</h1> <h2 id="这是标题-nbsp">这是标题 2</h2> <h3 id="这是标题-nbsp">这是标题 3</h3> <h4 id="这是标题-nbsp">这是标题 4</h4> <h5 id="这是标题-nbsp">这是标题 5</h5> <h6 id="这是标题-nbsp">这是标题 6</h6>
(2) Paragraph Marks
To display text in an orderly manner on a web page, paragraph marks are indispensable , just like we usually write articles, the entire web page can also be divided into several paragraphs, and the mark of the paragraphs is
. The basic syntax format is as follows:
<p>段落文本</p>
Example:
<p>宜将剩勇追穷寇, </p> <p>丌可沽名学霸王。 </p> <p>天若有情天亦老, </p> <p>人间正道是沧桑。 </p>
## (3) Horizontal line mark
In web pages, we often see some horizontal lines separating paragraphs from each other, making the document structure clear and hierarchical. These horizontal lines can be achieved by inserting an image, or simply by using a tag,
, which creates a horizontal line across the page. Example:
<p>hr 水平线:</p> <hr />
(4) Line break tag
. Example:
<p>html语言是<br />网页制作的<br />基本语言</p>
2. Text formatting tag
on the web page , sometimes you need to set bold, italic or underline effects for text. In this case, you need to use text formatting tags in HTML to display the text in a special way. Commonly used text formatting tags are shown in the table below.Display effect | |
---|---|
The text is displayed in bold (b defines bold text, strong defines emphasized text. | and |
Text is displayed in italics (i defines italic text and em defines emphasized text.) | ## |
## and | text is underlined (deprecated in HTML5 u) |