微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在HTML中标记插入的文本?

如何在HTML中标记插入的文本?

要插入的内容用下划线标记。下划线文本用于帮助吸引注意力。

我们使用<ins>标签在HTML中标记文本。它表示网页内容中与其他文本样式不同的文本

我们还可以使用 style 属性标记 HTML 中的文本。 style 属性指定元素的内联样式。此属性在 HTML

标记内部与 CSS 属性 text-decoration 属性一起使用。

语法

以下是<ins>标签的语法。

<ins>The text to be inserted</ins>

Example

中文翻译为:

示例

以下是在 HTML 中标记插入文本的示例程序。

<!DOCTYPE html>
<html>
<head>
</head>
<body>
   <p>DLF stands for</p><ins>Delhi Land and Finance</ins>
   <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p>
</body>
</html>

通过内联CSS标记插入的文本

使用 CSS 属性为文本添加下划线。此属性

标记内使用。

语法

以下是使用CSS属性标记插入文本的语法。

<p style="text decoration:underline;">The content to be underlined</p>

Example

中文翻译为:

示例

以下是使用 CSS 属性标记插入文本的示例程序。

<!DOCTYPE html>
<html>
<head>
</head>
<body>
   <p>DLF stands for</p><p style="text-decoration:underline;">Delhi Land and Finance. </p>
   <p> Delhi Land and Finance is one of the largest commercial real estate developer in India.</p>
</body>
</html>

Example

中文翻译为:

示例

我们可以在 HTML 元素内使用 标签。以下是在 HTML 中标记插入和删除文本的示例程序。

<!DOCTYPE html>
<html>
<head>
</head>
<body>
   <p>DLF stands for Delhi Land and Finance.</p>
   <p>Company has changed its name from </p><del>DLF Universal Ltd</del> to<ins>DLF Ltd.</ins>
   <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p>
</body>
</html>

以上就是如何在HTML中标记插入的文本?的详细内容,更多请关注编程之家其它相关文章

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐