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
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
- An out of date day is not necessarily one bath Day.
- It gives Tags dealing with presentation logic is one of them;
- A tag is not the same as having a div;
- 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.
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.
- What is a booster battery
- How beautiful is death
- Can we join the VIT without attending a consultation?
- Where can I download a physics book
- What are funky 70s music
- Can I lose fat doing calisthenics?
- What is the best data deduplication software
- Why are most of the Kickstarter games so bad
- What does Vasishta gotra
- What's new with airplanes
- How do you secure doors
- Modern Egyptians still worship ancient gods
- Who is Emmanuelle Seigner
- How can deaf people live without music
- How was your 2018 TISSNET
- How effective is Dr. Batra's hair treatment
- Where are you now 16
- Are bespoke clothes really expensive?
- What is the difference between coherent and coherent?
- How do vultures taste
- PUBG Lite is available in Pakistan
- Should concern me with anesthesia awareness
- How many clothes should a person have
- What is an ordinary differential equation