Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a semantic version of <u>?

In XHTML Strict, it seems that you're not allowed to use the <u> tag any more. Is there a semantic equivalent like there is for <b> and <i>? If not, is there any convention for how to markup underlined text in XHTML?

Thanks.

like image 398
Philip Morton Avatar asked Nov 18 '08 09:11

Philip Morton


People also ask

What is semantic version in NPM?

The Node Package Manager (npm) ecosystem uses Semantic Versioning, or SemVer, as the standard for version numbers. By default, when installing an npm package without specifying a version, npm installs the latest version published to the NPM registry.

Does semantic versioning start 0 or 1?

But it turns out that the semantic versioning spec does recommend to start initial development at 0.1. 0. If you really do not want to support 0.


2 Answers

In short - no.

<b> and <i> don't really have equivalents, either. It's all about the separation of content and appearance. The goal of XHTML strict is that the XHTML markup should be used to describe the structure of the content.

<em> tags are used to convey emphasis and <strong> tags are used to give strength to the content. It just so happens that the default style sheet in most browsers equates these to italic and bold respectively.

Having a direct equivalent for bold, italic and underline in XHTML would allow people to dictate the appearance of the content too closely. Ideally, you should think about why you want a piece of text to stand out, define that in the structure and then leave the CSS boys to decide how it should ultimately be rendered.

like image 77
Chris Roberts Avatar answered Sep 18 '22 20:09

Chris Roberts


To have an equivalent, you have to define why you are underlining things in the first place. If it's just your preferred way of emphasizing text, then use <em> and change its style in CSS to be underlined instead of italic.

like image 44
SpoonMeiser Avatar answered Sep 20 '22 20:09

SpoonMeiser