文本格式设置的格式html_HTML文本格式

文本格式设置的格式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提供了用于定义这些特殊文本的预定义特殊元素(标签)。 这些是,

TagFormatting Done
<b>Bold text
<strong&gtImportant 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

输出量

HTML Text Formatting | Example 1

<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

输出量

HTML Text Formatting | Example 2

<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

输出量

HTML Text Formatting | Example 3

<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

输出量

HTML Text Formatting | Example 4

<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

输出量

HTML Text Formatting | Example 5

<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

输出量

HTML Text Formatting | Example 6

<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 Text Formatting | Example 7

翻译自: https://www.includehelp.com/html/text-formatting.aspx

文本格式设置的格式html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值