如何在 HTML 中標記插入文字?
待插入內容用下劃線做標記。下劃線用於幫助引起對文字的注意。
我們使用 <ins> 標記在 HTML 中標記文字。它表示網頁內容中與其他文字的不同樣式的文字。
我們還可以使用 style 屬性在 HTML 中標記文字。style 屬性為元素指定了內聯樣式。此屬性用於 HTML <p> 標記內,使用 CSS 屬性 text-decoration 屬性。
語法
以下是 <ins> 標記的語法。
<ins>The text to be inserted</ins>
示例
以下是在 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 屬性給文字加下劃線。此屬性在 <p> 標記內使用。
語法
以下是使用 CSS 屬性標記插入文字的語法。
<p style="text decoration:underline;">The content to be underlined</p>
示例
以下是使用 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>
示例
我們可以在 HTML 元素內部使用 <ins> 標記。以下是在 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>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言
C++
C#
MongoDB
MySQL
Javascript
PHP