Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably because it's presentational, rather than "semantic". You're supposed to use CSS to do this.


If only they could retrofit <center> as a semantic tag, like they did with <small>.


<center>, though, has no semantic implication. <small> can be taken to mean "here be subsidiary information not worthy of large print (or in which we wish to hide critical information we do not with the reader to pay any attention to)". Centred text (or figures) is, and always has been, a stylistic decision, and there are already containers that are semantically meaningful to which that stylistic decision may be applied.


The repurposed definitions of B and I, when everyone remembers them as meaning "bold" and "italic" (and browsers still render them thus), seem really weak to me. SMALL makes sense really only because we have a concept of "small print". I will concede I can't conjure up a similar argument for CENTER, though alongside HEADER (the thing at the top of the page or a section thereof) and FOOTER (the thing at the bottom), it doesn't seem so ridiculous.

Let's not get started on the S/STRIKE/DEL mess.


And you would mark <i class="foreign" lang="fr">le seule mot juste</i> how? It's not emphasized, introducing a new term, or a citation, but it is traditionally typeset as italic (so simply marking it with a <span> is losing information). Much the same can be said for non-emphasized bold text. <strong> would be wrong. B and I still mean bold and italic respectively, but they are used only to cover the cases not specifically covered by other tags. Markup should be about langue, not parôle.


> it is traditionally typeset as italic (so simply marking it with a <span> is losing information).

"traditionally typeset as" is not information about the content, its information about historical typographical practices.

Ideally, over time, the actual semantics, rather than merely the traditional presentation, of the things where the "B" or "I" tags might be the currently least-bad standard tags would be defined in HTML. Though <span lang="fr"> is already semantically adequate for the specific case you present because the "foreign" is implicit in the span having a different lang attribute than the surrounding content, and the "i" is just an irrelevancy about traditional presentation of foreign-language content.


I can think of an use case for semantic <center> [0]: snippets of text that are somewhat connected to the current text (so they're not an <aside>) but serve a presentational role in the context of the text.

An example:

  Now a ghost, Mr. Smith was surprised to see the words on his own gravestone.
  	 		    HERE LIES
  			A MAN OF NO VIRTUE
[0]: Now that I'm capable of thinking up obscure cases, I just have to hone my ability to sanctimoniously ignore real needed uses and I'll be on my way to join a standards body.


<center>-al (central) information maybe? but yeah, i understand why they don't standardise it, but still i prefer a working <center> tag over

  {
      display: block;
      margin-left: auto;
      margin-right: auto;
  }


You'll need width defined here too..


Agree. And also no valign="middle" in HTML5 <td> elements drives me crazy. I know I'm "supposed" to use CSS, but CSS should be simple. I shouldn't have to fight with silly non-intuitive negative margins and nested div hell just to center something. And then deal with IE's own artistic interpretation of that div hell.


You don't need to use negative margins or anything. You just need the flexible box model (http://philipwalton.github.io/solved-by-flexbox/demos/vertic...).




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: