HTML Basics: Insert vs. Underline – A Quick Guide to Properly Underlining Text in Your Documents

Deutsch

Underline Text – What is the Difference between INS and U Tag?

INS and U are Inline Elements. That means: an automatic linebreak is not generated.

By default, the output of INS (inserted) and U (underline) are displayed in the same way by the web browser. Both tags underline the text that is marked up in this way. This means that they draw a thin horizontal line on the baseline of the text. However, there is a significant difference between these two HTML tags.

The HTML <ins> Tag

Unlike the U tag, the HTML INS tag has a logical meaning. This tag is used for content that is added after the text has been written. The added part of text begins with the opening tag <ins> and must be closed with </ins>.

In practice, the INS and DEL tags. are often used together. A section of text marked up in this way has been subsequently changed or corrected. Added text is generally not tagged with INS, as this would make a web page difficult to read.

Subsequently inserted Text is generated using the <ins> tag.

The event is scheduled for <del>Wednesday, March 12, 2025</del>&nbsp; <ins><b><mark>Wednesday, March 26, 2025</mark></b></ins>.

The date that is not valid anymore is crossed out and the new date is inserted using the <ins> tag. To make the corrected date more visible, it is highlighted in color and displayed in bold. With &nbsp; a protected space is inserted between the two dates to separate them more clearly.

The event is scheduled for Wednesday, March 12, 2025   Wednesday, March 26, 2025.
     
An INS tag mustn't be placed directly inside a DEL tag.

The HTML <u> Tag

The HTML U tag doesn't have any semantic meaning, but it is used for visual styling purposes only. Text marked up with U is underlined. The underlined text begins with <u> and must be closed with closing tag </u>.

Create subsequently inserted text by using the <u> tag

The event is scheduled for <s>Wednesday, March 12, 2025</s>&nbsp; <u><b><mark>Wednesday, March 26, 2025</mark></b></u>.

The new date is added with the <u> tag. It is also marked in color and displayed bolded. With &nbsp; a protected space is inserted again between the two dates to separate them more clearly.

The event is scheduled for Wednesday, March 12, 2025  Wednesday, March 26, 2025.
     

The INS tag is rarely used in practice because it would clutter the web page. It doesn't provide any additional information to the user.

The two HTML tags work very well from a technical point of view, but they are not very practical to use because the only things that should be underlined are links.

Most visitors will automatically assume that any underlined text is a link. When they realize that they have been fooled by the underlining, they will turn away in frustration and leave your website with a negative feeling about it.

If at all possible, you should avoid underlining text if the underlined text could be mistaken for a link.

Style the <ins> and <u> tags with CSS according to your specific needs.