Why do people hate W3schools com

Why is the
tag out of date in HTML?

I'm just curious why the tag was out of date in HTML.

That was an easy way to quickly center blocks of text and image by encapsulating the container in a tag, and I really can't find an easier way to do it now.

Does anyone know an easy way to get "stuff" centered (not that and the width), something that replaces? And why did it become obsolete?


The item was obsolete because it was the presentation defines its content - it does not describe its content.

One method of centering is to set the element's properties to, and then set the parent's property to. This guarantees that the element will be centered in all modern browsers.

According to W3Schools.com,

The center element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.

The HTML 4.01 specification gives this reason for rejecting the tag:

The CENTER element corresponds exactly to the specification of the DIV element, whereby the align attribute is set to "center".

What I do is do general tasks like centering or hovering and making CSS classes out of them. When I do that, I can use them on all pages. I can also call as many as I want.

Now I can use them in my HTML to do simple tasks.

Sometimes I still use the

tag because nothing works in CSS either. Examples of trying to use a
trick and failing:

gets results. To use CSS instead, you sometimes have to put CSS in multiple places and play around with it to get it properly centered. To answer your question is CSS has become a religion with believers and followers who have avoided
as blasphemy, unholy and far too easy for their own job security. And if they try to steal your from you, ask them what the CSS equivalent of the Colspan or Rowspan attribute is.

It is not the abstract or literal truth, but the lived truth that counts.
- Zen

You can still use this with XHTML 1.0 Transitional and HTML 4.01 Transitional if you want. The only other way (the best way in my opinion) is with margins:

Your HTML code should define the element, not control how it is displayed.

The markup, which is the HTML tags, is intended to represent the meaning and structure, not the appearance. It was badly messed up in early versions of HTML, but the standards people are now trying to clean up.

One problem with controlling the appearance of tags is that your pages will not work well with devices for the disabled, such as screen readers. It also causes your text to have many, many tags that don't help clarify the meaning, but overload it with information from another level.

Hence, CSS is designed to move the formatting / display to another language that is separate from the text and that way can be easily preserved. This enables, among other things, changing stylesheets in order to change the appearance of a website without touching the other markup. And that for many sides in a swell foop.

The tools that CSS offers you to do this are not always elegant, I'm on your side. For example, there is no way of doing effective vertical centering. And horizontal centering isn't much better if it's not just for text.

You have the choice between simple, effective and messy or clean, elegant and cumbersome. I don't understand why web developers are putting up with this mess, but I think they're happy to have at least a chance to get their stuff done.

HTML is used to structure data and not to control the layout. CSS is supposed to control the layout. You will also find that many designers disapprove of the use of layouts for the same reason.

For text and images you can use:

CSS has a property, and since this is a purely visual and not a semantic thing, it should be referenced to CSS, not HTML.

Food for thought: what would a text-to-speech synthesizer handle?

You can add this to your CSS and use it

or if you want to keep and be prepared in case it is ever removed add this to your CSS

The least popular answer

  1. An out of date day is not necessarily one bath Day.
  2. It gives Tags dealing with presentation logic is one of them;
  3. A tag is not the same as having a div;
  4. The fact that you have a other Being able to do something does not invalidate it.

Let me explain because there are notorious downvoters here who think I'm defending old school HTML4 or something. No, I'm not. But the debate is just a trend, there is no real reason to drop a label that serves a valid purpose well.

So let's look at the main arguments against it.

  • "It describes presentation, not semantics!"
    No. It describes a logical arrangement - and yes has a standard appearance, just like other tags like or do. The point, however, is the relationship of the enclosed part to its surroundings. The center says, "this is something that we separate by visually different positioning".

  • "It is not valid"
    Yes that's it. It's just out of date, like in, could be removed later . For more than 15 years. And it doesn't seem to be going anywhere. There are great websites out there that use this tag as it is very readable and to the point.

  • "It is not supported in HTML5"
    It is actually one of the most widely supported tags.

  • "It's oldschool"
    Shoelaces are old school too. New methods don't invalidate the old ones. You want to feel progressive and modern: good. But don't make it the law.

  • "It's stupid / awkward / lame / tells a story about you"
    None of them. It's like a hammer: a tool for a specific job. There are other tools for the same job and other jobs for the same tool. But it was created to solve a specific problem, and that problem still exists, so we might as well use a dedicated solution.

  • "You shouldn't be doing this because CSS" The
    Centering can absolutely be achieved through CSS, but that's just one way, not the only, let alone the only one suitable . All that supports, works and is readable, should be okay.


The only reason not to use is because people will hate you.

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.