如何在 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