How to mark inserted text in HTML?



The to be inserted is marked with an underline. Underlined text is used to help draw attention to the text.

We use the <ins> tag, to mark a text in HTML. It represents a text in a different style from another text in the content of the web page.

We can also use the style attribute, to mark a text in HTML. The style attribute specifies an inline style for an element. This attribute is used inside the HTML <p> tag, with the CSS property text-decoration property.

Syntax

Following is the syntax for the <ins> tag.

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

Example

Following is the example program to mark inserted text in 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>

Marking inserted text by inline CSS

Underlining text using CSS property. This property is used inside the <p> tag.

Syntax

Following is the syntax to mark inserted text using CSS property.

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

Example

Following is the example program to mark inserted text using CSS property.

<!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

We can use <ins> tag inside the HTML elements. Following is the example program to mark inserted and deleted text in 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>

Advertisements