如何在HTML中標記插入的文字?

WBOY
發布: 2023-08-26 09:21:26
轉載
1237 人瀏覽過

如何在HTML中標記插入的文字?

要插入的內容用下劃線標記。下劃線文字用於幫助吸引註意力。

我們使用標籤在HTML中標記文字。它表示網頁內容中與其他文本樣式不同的文本

我們也可以使用 style 屬性來標記 HTML 中的文字。 style 屬性指定元素的內嵌樣式。此屬性在 HTML

標記內部與 CSS 屬性 text-decoration 屬性一起使用。

文法

以下是標籤的語法。

<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中標記插入的文字?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:tutorialspoint.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!