文本格式设置的格式html
HTML文本格式标签 (HTML Text Formatting Tags)
Text formatting is the process of defining the text in some special type like bold, Italic, underlined, which changes color, etc which make the text special look special as compared to others.
文本格式设置是将文本定义为某种特殊类型的过程,例如粗体,斜体,带下划线,会更改颜色等,从而使特殊文本与其他文本相比显得特殊。
格式化HTML中的元素 (Formatting elements in HTML)
HTML provides predefined special elements (tags) for defining these special texts. These are,
HTML提供了用于定义这些特殊文本的预定义特殊元素(标签)。 这些是,
Tag | Formatting Done |
---|---|
<b> | Bold text |
<strong> | Important text |
<i> | Italic text |
<em> | Emphasized text |
<mark> | Marked text |
<small> | Small text |
<del> | Deleted text |
<ins> | Inserted text |
<sub> | Subscripted text |
<sup> | Superscripted text |
<u> | Underlined text |
标签 | 格式化完成 |
---|---|
<b> | 加粗字体 |
<strong&gt | 重要文字 |
<i> | 斜体文字 |
<em> | 强调文字 |
<标记> | 标记文字 |
<小> | 小文字 |
<del> | 删除文字 |
<ins> | 插入文字 |
<sub> | 下标文字 |
<sup> | 上标文字 |
<u> | 带下划线的文字 |
<b>和<strong>标签 (<b> and <strong> Tags)
Both the elements define a bold text but in case of strong a strong importance (semantically) is added to the text.
这两个元素都定义了一个粗体文本,但是在强烈强调的情况下(似乎)将添加到文本中。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p>I love to learn programming from <b>Include Help</b></p>
<p>I love to learn programming from <strong>Include Help</strong></p>
</body>
</html>
Output
输出量

<i>和<em>标签 (<i> and <em> Tags)
Both the elements define an italic text but in case of emphasized importance (semantically) is added to the text.
这两个元素都定义了斜体文本,但是在强调重要性的情况下(语义上)被添加到文本中。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p>I love to learn programming from <i>Include Help</i></p>
<p>I love to learn programming from <em>Include Help</em></p>
</body>
</html>
Output
输出量

<small>标签 (<small> Tag)
The small element is used to define text with smaller text as compared to the rest of the text.
与其他文本相比, small元素用于定义文本较小的文本。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p>I love to learn programming from <small>Include Help</small></p>
</body>
</html>
Output
输出量

<mark>标签 (<mark> Tag)
The mark element is used to define a marked or highlighted text.
mark元素用于定义标记或突出显示的文本。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p>I love to learn programming from <mark>Include Help</mark></p>
</body>
</html>
Output
输出量

<del>和<ins>标记 (<del> and <ins> Tags)
The del element is used to define text which is deleted or removed from the text.
del元素用于定义从文本中删除或删除的文本。
The ins element is used to define text which is inserted (underlined).
ins元素用于定义要插入(带下划线)的文本。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p>I love to learn programming from <del>Include Help</del></p>
<p>I love to learn programming from <ins>Include Help</ins></p>
</body>
</html>
Output
输出量

<sub>和<sup>标签 (<sub> and <sup> Tags)
The sub element is used to define text which is to be written in subscript or below the text.
sub元素用于定义要在下标或下方编写的文本。
The sup element is used to define text which is to be written in superscript of the text.
sup元素用于定义要以该文本的上标书写的文本。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p><b>Algebraic formula:</b> (A+B)<sup>2</sup> = A<sup>2</sup> + 2AB + B<sup>2</sup></p>
<p>The <b>molecular formula for water</b> is H<sub>2</sub>O</p>
</body>
</html>
Output
输出量

<u>标签 (<u> Tag)
The u element is used to define text which is underlined.
u元素用于定义带下划线的文本。
Example:
例:
<!DOCTYPE html>
<html>
<body>
<p>I love to learn programming from <u>Include Help</u></p>
</body>
</html>
Output
输出量

文本格式设置的格式html