0

I understand the whole presentation vs relation argument that underlies the removal of as a tag from the HTML spec, however:

  • Some browsers still require/recognize this tag.
  • There are various issues with the (various) alternatives.
  • There are some arguable relational uses of the word 'center', as in that this element is to be considered central with respect to its neighbors, with no actual presentational meaning included (although a default CSS styling could be applied).

Would this line of reasoning be enough to bring back into the HTML standard as both a functional and practical way of doing things?

Apologies in advance if this question is provactive, one of my first SO questions.

smaudet
  • 609
  • 8
  • 17
  • Can you tell me the difference between
    and
    because I don't think there is any. The third point doesn't make much sense either because changing what the tag represents would also remove it's inherent visual style, which would be added as CSS regardless.
    – Matthew Darnell Feb 27 '13 at 21:26
  • 1
    @MatthewDarnell 'style=' is inline CSS. You need a way to attach CSS to specific elements. – Philip Whitehouse Feb 27 '13 at 21:29
  • I was using that as an example. Obviously, you would want to use a class and apply the CSS in a stylesheet, I'm just saying that they behave the same, contrary to what OP said. – Matthew Darnell Feb 27 '13 at 21:31
  • 1
    @MatthewDarnell - The [HTML5 spec says](http://www.w3.org/html/wg/drafts/html/master/rendering.html#flow-content-0): 'The center element, and [div align="center"], are expected to center text within themselves, as if they had their 'text-align' property set to 'center' in a presentational hint, **and to align descendants to the center.**' (My emphasis). It is the emphasized part which is different. – Alohci Feb 27 '13 at 22:18
  • I cannot think of a single reason why bringing back the `
    ` tag would be a good idea.
    – Chuck Le Butt Feb 27 '13 at 22:35

7 Answers7

2

To answer the core question here:

What would it take to get '' re-admitted to the HTML standard?

I think it would take a lot.

The thing is this: as it stands, <center> is very much a layout tag. Anything that changes the tag sufficiently to bring it back into contention would simultaneously alter its usage so much that it would be better for backward compatibility to have an entirely new tag instead.

Centering of elements and/or text can be done in CSS with well-established techniques, and with no compatibility issues, even in older browsers, so there's no need for a <center> tag either, any more than there is for <b> or <i> tags.

But I think the main point is that regardless of any merit or lack of merit in the <center> tag, the team responsible for developing the HTML spec have made the decision to deprecate it, and I can't imagine any line of thinking that would change their mind.

Your may be asking 'why not?', but I think their response would be 'why?'. And I don't think there's an answer you could give to that which would be sufficient to sway them.

Spudley
  • 166,037
  • 39
  • 233
  • 307
1

"There are some arguable relational uses of the word 'center', as in that this element is to be considered central with respect to its neighbors"

This is very abstract semantics which doesn't really have any role in a document. I can't see it being useful. It's not even clear that 'center' is a good term for it - <focus> sounds more the point you are trying to make.

On the larger point. It would need a clear semantic meaning that is relevant to the actual structure of most content on the web. Hence the push for tags like <video>, <navigation> and <email>.

Philip Whitehouse
  • 4,293
  • 3
  • 23
  • 36
1

The key question you need to answer is "What is the problem that needs to be solved?" That is the starting point for all new or resurrected elements. If the problem is presentational, then its fix would be in CSS, not HTML. It is expected that you would provide data gathered from real world web pages to demonstrate the reality of the problem.

Once the problem has been identified, and it has been deemed that an appropriate solution is required and should be in HTML, and that there is no existing solution in HTML, you can contribute to the process to decide what the best solution to the problem is.

If you could gain agreement that adding the <center> element was the best solution to the problem, then it would likely be added to HTML.

Alohci
  • 78,296
  • 16
  • 112
  • 156
0
  • Browsers handle many deprecated tags as a courtesy, not because the devs necessarily believe they should be in the spec
  • Such as?
  • This would fundamentally change the use of the tag, from formatting to presentation structure, no?
isherwood
  • 58,414
  • 16
  • 114
  • 157
0

I think the center-tag is an element meant for styling and thus should be handled with CSS. It doesn't add semantics to the page.

See this SO-question

Community
  • 1
  • 1
Willem de Wit
  • 8,604
  • 9
  • 57
  • 90
0

On a webpage, what exactly would a "" be?

Considering that the tags should describe what the content is. This tag only tells you where it is located on the page rather than anything about itself.

To bring back this tag, there would have to be a very compelling reason why to describe a pages content as center.

Schleis
  • 41,516
  • 7
  • 68
  • 87
0

The reason that this tag is not valid in HTML5 is that they want to remove most of the styling tags and attributes so that styling will be only by CSS, also removed <font>, the align attribute, bgcolor attribute and some more design related things. you can center elements in css with "margin: 0px auto".

WhiteBlue
  • 313
  • 1
  • 2
  • 7