whats the difference between the <u> tag and the <ins> tag?

Semantics. The <ins> tags means content inserted after it was first published. The <u> tag is simply for underlining and has no meaning.

Reference: <ins>, <u>


The official difference depends on the HTML specification or draft that you choose to regard as official.

By the HTML 4.01 specification, u means underlined text style, whereas ins means that its content has been “inserted [...] with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes). The rendering of ins is not specified; instead, some possible renderings are described. In practice, browsers mostly use underlining. There is also the formal syntactic difference that u allows text-level content only, whereas ins may contain blocks, too.

In the HTML5 drafts, ins is essentially similar but with different wordings and with an explicit suggestion, or maybe (semi)recommendation, that the default rendering use underlining (see 10.3.4 Phrasing content there). The u was previously excluded from the draft, now added but with invented meaning: “The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt.” If this does not make sense to you, you’re not the only one. And u has underlining as the suggested, or recommended, default rendering.

In practice, the effect is mostly the same, except that ins tags are ignored by some old browsers. Some exotic browser could use different rendering. I have not seen any evidence of any browser, search engine, or any other relevant software make any distinction between the two; their “semantic difference” has no practical impact.

However, I would not use ins for anything except inserted text in some sense, just because some future browsers might treat it in some way that makes sense for inserted text but not otherwise. And there would be no tangible benefit from using ins just for underlining: u is shorter markup and more widely supported. Then again, situations where you should underline text, except links, on web pages are rare.


ins is a semantic tag : it denotes an element which has been inserted (see also del for deleted elements) while u gives the engine the instruction to render the element as underline.

Some engines may decide to render ins as u but you can use the "semantic meaning" to decide to render it otherwise (with CSS). Speaking of CSS, it renders <u> useless and just makes style maintenance more difficult, just like <b>, <center>, and so on.

As for the other edition tag, del, it's not widely used and it's not really clear why it should be.

Reference :

http://www.w3.org/TR/html-markup/ins.html

http://www.w3.org/TR/html-markup/del.html

http://www.w3.org/TR/html-markup/u.html

Tags:

Html