Why is the <nobr> tag expired?
I understand that this tag can easily be replaced with <span class="nowrap"> and a bit of CSS, but in real markup I often find that the <nobr> more appropriate. It is not about style, it is about content. <nobr>VV Putin</nobr> for example (there shouldn’t be a line break in the Russian surname and surname of the printing house, I think that such rules apply to other languages).
I guess fatigue means something better, but I don’t see how style is better than a single tag. Of course, there are places where you need to use CSS. Did I miss something?
It is not outdated because it has never been standard.
HTML (theoretically) is a semantic markup language. It describes the structure and semantics of a document along with relationships with other resources.
HTML should not describe a presentation. During the browser wars, a bunch of presentation features were added. Some of them have become standardized. Most of them were subsequently deprecated when CSS appeared.
CSS is a description description language. When you have a piece of text that should not have a line break in it, this is usually a presentation issue, so CSS is the right place to do this.
Exceptions are usually handled by non-breaking spaces ( ).
I found this interesting and very explanatory comment on the w3c mailing list :
<NOBR> cannot be deprecated since it was never part of even the transitional versions of HTML W3C; it is purely personal.
Yeah. Thus, this has never been and never will be part of the specification. Just something "missing" added using CSS.
This is because the correct tag should be semantically useful when <nobr> does not have any semantics other than its style. I guess for the same reason why <center> and similar style tags were deprecated.
The right way to achieve what you want is to declare that "V.V. Putin" is a valid noun and defines in CSS that such a proper noun should not be broken into lines.
<span class="propernoun">VV Putin</span> and in CSS you define
.propernoun { white-space: nowrap; } Since ... HTML is not about style, but about content. In principle, this is the same as the OP suggested, but nowrap in class = "nowrap" describes a presentation property in html, which should be in the stylesheet.
Stupidity. This is the only reason.
<nobr> is universally supported because it is necessary to convey the fact that the embedded content is semantically a single entity, so it cannot be divided into several lines.