Can someone actually explain why the <center> tag is deprecated?

This just isn’t true, the use of tables for stylistic reasons is deprecated, the use of tables for their semantically correct purpose is not deprecated.

It’s a very important distinction to make, as you don’t want people to think they shouldn’t use tables when it’s appropriate. :slight_smile:

No, those days are just waiting for IE6 and IE7 to die out as they are the only common browsers that don’t allow you to define your layout tables that way using the appropriate CSS - display:table-cell - until those browsers die out we are stuck with using either position:absolute or float to try to emulate the desired effect.

[ot]

Come on, ‘she’ is a bloody spammer and self-proclaimed ‘SEO expert’ who believes posting junk on a high-profile forum like SPF will generate valuable back links.

It’s frankly amazing that the mods didn’t ban this user after the first spam post, let alone allowing ‘her’ to make another. :rolleyes:

Everyone, please, don’t feed the trolls![/ot]

Off Topic:

Hmm, possibly Tommy is correct; now I’ve seen some damning evidence. So I’ve removed the food source - just to be on the safe-side.

to be efficient a programmer needs general guidelines. one reason for that is a clear solution for similar problems. another reason is later development.

these guidelines, already in place in other programming areas, are only starting to penetrate html world and are based on observations made over the years on how improvements can be made. still, observations for improvements in html area, based on previous findings and practices from other mediums, are scares, sadly. there are so many things we could benefit from previous ides and interfaces, but ignored.

however, you can still ride your bike to work, but if you travel for a long distance, you need a generalized and full proof system for covering big distances, fast.

separation in content, presentation and behaviour does that for you. but, as you said, for small steps, one can stray. just be careful not to be caught off guard by your past programming.

it’s also a question of time. will that site really be around when <center> will become extinct? we are careful in projecting, but this is really for us, as programmers. applying the same rule everywhere, by everybody, is making our job easier, one for another.

The confusing thing with browsers is that they started out with the content and appearance separated in HTML 1 and it was later browsers that dropped the provision for being able to set the appearance separately and so polluted the HTML with ways to set appearance - something that was never supposed to happen since those who created HTML in the first place were well aware of the advantages of keeping the two separate.

Unfortunately with something in such widespread use as HTML is you get a lot of people who don’t have the necessary experience involved in helping to set the standards and so there are lots of things in the HTML 3.2 and HTML 5 standards that should never be used. At least with HTML 5 there is still time to delete all the unnecessary garbage prior to it being adopted (although with so many people without the necessary background being involved it is unlikely to happen and HTML 5 will end up as big a mess as HTML 3.2 was).

I’ve been saying that for two years… HTML5, the new 3.2! It’s like it’s put together by the same people who went from endless nested tables for layout to endless nested DIV for layout (instead of just styling semantic elements directly), and the people who completely missed the point of STRICT, and the original point of HTML.

Back when TBL created HTML, the entire idea was to mark elements as what they WERE, and allow the user agent (aka browser) to best determine how to show it. Along came Netscape and Microsoft and in their war to outdo each-other they tacked on all these presentational properties basically giving little more than lip service to the W3C (even when they were members of it). They then used their influence to shove a number of these proprietary properties down the W3C’s throat - hence the ******* child of the family, HTML 3 was born.

The STRICT incarnation of HTML 4 (and by extension X1.0) were created to undo all that, so that when devices other than the ones you design for come across the page, the page still works properly. This is why presentational tags and attributes were axed along with things you shouldn’t even be doing in the first place like TARGET and FRAMES.

Stylesheets are the missing part of that puzzle, though it’s amazing how often I see people who still don’t use it properly… Mind you, I had my way I’d obsolete STYLE both as a tag and attribute (for those of you unaware of this, obsolete is one level harsher than deprecate; likewise I’d obsolete all the currently deprecated tags except menu), so I’m a bit more radical than most on the subject – but it blows my mind how many people have never even HEARD of media types, WASTE their time putting character encoding in their stylesheets when CSS can only contain ASCII-7, declare their content in px metric fonts, try to use absolute positioning or fixed height backgrounds on their content, etc, etc, etc…

Most of the problem stems from most people being unable to get their heads out of 1998’s backside. NOT THEIR FAULT – 90%+ of the books on shelves are a decade or more out of date - even when they were released recently.

As Ian Lloyd said in the video promoting the 2nd edition of his book

BEEN THERE. I’m sure some of you have too.

In a lot of ways it’s about overcoming a decade and a half of people just sleazing out pages any old way - from half-assed “tools” like Frontpage and Dreamweaver (As Dan used to say, the only thing that can be considered professional grade tools in Dreamweaver are the people promoting it’s use) to using tags like FONT and CENTER or attributes like COLOR, BGCOLOR, VALIGN, etc… Basically stuff we were able to stop doing the moment IE6 put netscape 4 in the grave, stuff that was deployable across all major browser engines five years ago, and today has no place in the construction of new pages.

But what does one expect when most people can’t figure out how to use heading tags in proper order IF they use them at all, still slap tables around elements for no good reason (even when using tables for layout - usually you need one or two tables, not twenty), or they stop using tables and instead slap div’s around everything for no good reason ([i]when 90%+ of the styling can be applied to the tags being wrapped), abuse lists on tabular data because “tables are evil” (yes vBull 4, I’m looking at you!) or worse, they believe the myth about them being deprecated (see the people who believe the same thing about B and I) - the list goes on and on when it comes to outdated half-assed sleaze it out any old way coding techniques that should have been kicked to the curb a DECADE AGO.

I think that’s part of what bugs me about HTML 5 more than any other factor - most of the people embracing it never bothered learning to do STRICT properly, use semantic markup, or even practice separation of presentation from content in the first place, and it’s evident in their code where you see things that are little more than George Carlin’s joke about abortion: “Not every ejaculation deserves a name” – NOT every semantic tag needs a class on it or a DIV around it!

html5 suffers from style fever. it tries to follow a trend in web design rather than resolving issues of previous html standards.

following a trend only works in fashion industry and only for a little time.

VERY good way of putting it – and again part of what makes it so much like HTML 3.2

CSS3 suffers from that too - just as the browsers do. As I’ve said repeatedly maybe instead of concentrating on specifications not even out of draft, browser coders should focus on getting HTML4/CSS2 working properly FIRST. See gecko’s decade old rendering bugs, and webkit’s stupid mistakes like screwing up CAPTION’s behavior, ignoring word-spacing between inline-level elements, incorrectly obeying letter-spacing between display:inline (and inline-block) elements, etc, etc, etc… It’s actually kinda sad when IE8 was a better step in that regard than any of the other browser makers efforts since at least they TRIED to fix their HTML4/CSS2 bugs before moving on to 5/3.

Part of my problem with open source - if the people with the skills to fix it don’t need it, and it’s not flashy or trendy, don’t count on it EVER being fixed.

No, it’s put together mainly by representatives from browser vendors, who want to standardise or un-deprecate all the rubbish they’ve had to support over the years anyway. Then they add a few things, like <nav> and <article> that doesn’t require any development time at all, so that they can brag about adding new ‘semantic’ element types. You’re right that they miss the point of Strict, though. And their contempt for accessibility is appalling .

To make matters worse they seem to have decided to ‘legalise’ more or less everything that exists on the Web today. Why not, since they have to support it anyway? But it’s like legalising rape and murder to reduce the crime figures. Effectively they’re letting the totally clueless and the victims of WYSIWYG rubbish generators dictate what should be considered best practice. There are times when democracy isn’t the best solution.

I like that comparison.

Exactly my take on a lot of those new “semantic” tags – extra containers like NAV just to justify the people who like wrapping their UL’s in a DIV for no good reason.

In other words, mollycoddling the addle-minded.

Though what I don’t get about people not understanding STRICT is that it’s EASIER… Why the hell do people find all that outdated presentational crap resulting in 10:1 code to content ratios “easier” than strict with a more reasonable 2:1 to 3:1 ratio? Shouldn’t using less code be easier? Shouldn’t saying what things ARE be easier?

But with people sleazing out a psd and thinking that makes them a web designer… What was that you said about an “appalling contempt for accessibility?”

The other point about HTML 4 STRICT is that it is the only variant that is actually HTML 4. The TRANSITIONAL version is basically a combination of HTML 3.2 and HTML 4 to allow people to transition from one to the other without having to do it all at once. So instead of having to throw out all the garbage at once you get to do one room at a time. Of course most people aren’t throwing out any of the garbage and are racing forward from a garbage ridden HTML 3.2 to HTML 5 where the garbage has been redefined to be features. Visions of a house full of garbage being promoted by real estate agents as feature filled comes to mind.

So while 90% of web pages still contain garbage the decision has been made that instead of waiting for at least some that garbage to be cleaned up before looking to perform further cleanups (as XHTML 2.0 proposed) that the cleanup will be made unnecessary by just undoing much of the work that was done to define the garbage as such in the first place.

By the time that HTML 5 becomes a standard the <video> <audio> <embed> <iframe>tags will just duplicate an equally simple <object> tag and we’ll have five tags to serve the purpose of one. Somewhat reminiscent of <applet> etc from HTML 3.2.

… and that really does seem to be what it boils down to - worse than people not throwing away the garbage, they’re still making new garbage like it was 1998. Take one look at 90% of the ‘help me’ threads and the majority of people making new sites are still vomiting up disasters and calling them websites using outdated methodologies with hordes of unnecessary non-semantic markup… Made all the worse by being total accessibility failures and often having nothing for the search engines to even SEE.

Made even funnier when it’s so called SEO ‘experts’ vomiting up the non-semantic accessibility /FAIL/ – so much for ‘writing for people is writing for the search engine’ :wink:

i would’ve expected html mark-up to become simpler in html5. for me, as an example, it lacks:

  • in the in the i18n department. that is a topic to be takes seriously.

i would’ve expected css rules to become more powerful in css3. for me, as an example, it lacks:

  • a feature of inheritance (not just cascade)
  • a feature of cloning (not just cascade)
  • some new positioning features. it’s all a container in a container in a container, but i don’t see this being very much exploited. it’s time to get past inline and block and float.

these are topics that last. <center> is just an opportunity. it only makes for a beautiful tautology. this has to stop somewhere (speaking of which, indeed <object> would’ve been an universal solution, as stated in html 4.01).

Well said! :slight_smile:

That used to baffle me, too, but I think I’ve found out why. Most people (designers/developers) see a web page as a visual representation of an idea. For them the layout, the colours and the decorative images are the page; the content is, at best, an aside. At worst it’s some filler needed to justify the existence of the pretty page, or bait for search engines.

You and I and Stephen share the original view of the web that the W3C had from day one: that the content is the most important thing and that the presentation is something that is added on top of the content in certain circumstances. The presentation is still important (in those circumstances), but not as an end unto itself.

For the former group, presentational markup makes sense. Like the OP of this thread they think in terms of ‘fewer characters to type’ and ‘keeping everything in one file’. And if you look at a web page as a pretty picture with some more-or-less-meaningless letters on it, then I can sort-of understand how that could make sense.

Anyone who has ever had to maintain – not to mention redesign – a non-trivial web site of more than three pages knows the indisputable benefits of separating content and presentation. But I guess designers/developers who only create new sites, deliver them to clients and the forget about them may not have encountered the issues involved in site maintenance.

Aye, that is mostly it. The bait for the search engines part is funny in a way - how the biggest lesson of SEO; “content is king” ends up abused like everything else they abuse. I’m constantly seeing websites of late with no content of value that in SEO terms are little more than polishing a turd.

Well that’s like I keep saying: People visit websites for the content, NOT for the goofy graphics you hang on the content. I think that’s a particularly bitter pill for many ‘designers’ to swallow - not realizing their flashy one-offs are like posters, cool when you get them, sad and pathetic three months later.

Look at the big successes - Amazon, E-Bay, Google - these are NOT design wonders, but they provide content of value in an easily navigable format that works pretty much any browser anywhere anytime… even with their outdated markup and scripting for nothing; the multitude of sins are easily forgiven thanks to content of value.

It’s why my approach to web design is content FIRST. Mark up the content using semantic markup with zero concern for appearance, and oddly the CSS off appearance will be fairly attractive and usable to the end user. THEN you design your fancy layout using CSS (adding a few semantically meaningless wrappers like DIV and SPAN as presentational hooks when necessary), and then only at the final stage do you boot up the goof-assed paint program to hang graphics on the layout. This staged construction also means that when technologies are missing, there’s still something to fall back on.

This whole drawing a pretty picture first nonsense is how we end up with broken layouts due to dynamic fonts over fixed height containers/backgrounds, miserable accessibility /FAIL/ since being so concerned with the appearance before the code semantic markup is a joke if present at all, etc, etc…

“designing in a PSD” is another of those “I meet the person who came up with this in a dark alley, bad things are going to happen” Latino Militant Moments. Shoehorning content into a sliced up PSD is no way to build a website if you care about accessibility, speed or ease of access - and yet it’s become the industry norm because the suits who don’t know any better are more impressed by flash than substance.

Well, unless you talk to their wallet. Lowered hosting costs and/or higher traffic due to people actually letting the page finish loading (that’s directed at those of you who see nothing wrong with 2 megabyte websites built out of 200+ files per PAGE) can really get you in the door.

inconsistences in html specs will mark the end of html wide spread use?

i don’t really like designers or half developers for the mess in the web platform.

to me, it’s only a matter of time to witness the heavy use of java in reverse: as a web plug-in for interfaces in other mediums. instead of succeding in making html able to work with different <object> elements to enrich content, we’ll see more and more ides that are ajax capable/html indiferent. by java or by other means. flash, air, silverlight.

if this battle of content over presentation over behaviour it’s not solved in a decisive way, browsers will become collateral damage. there is to much pressure now on the web platform, to much at stake, to rely on these mood swings found in specs. nevermind different ways in approaching and different interpretation of them. at one point someone will cause a massive break of the lines towards proprietary technologies, leaving behind cross-platfom html gains, because of the headaches caused by them.

anyway, back to subject. according to html 4.01 specs,
"
The CENTER element is exactly equivalent to specifying the DIV element with the
align attribute set to “center”. The CENTER element is deprecated [p.38] .
"

i tend to believe, from the current html5 point of view, that the question of this thread, no matter how wrong, is legitimate.

specs are spiriling towards one another. if html 4.01 is generalizing (gives <div>, takes back <center>), html5 takes it back (gives back “versions” of <center>; some good: <header>, <footer>, some bad: <nav>, <article>).

so i believe it’s not a bad question, when you look from this perspective. it oulines wrongs in html5 current proposals. a good counter-example for html5 current direction.

I don’t understand why the l33t web developers in this thread get so worked up over HTML specs. Why does it bother you so much that some people use outdated tags on their websites? Isn’t it good enough that your website looks pretty on 98% of user’s screens. I have better things to do than to care about every little semantic HTML detail on OTHER people’s sites; like writing good content, polishing my marketing skills, reading about SEO, creating Wordpress plugins, creating Iphone Apps, trying to master Google Adwords, and thus making more money than most of the lowly web designers in this thread.

actually, by reading these “l33t web developers” posts you can learn something. experience and knowledge is what you came here to find. and perhaps some good people to steer you in the right direction.

that’s education and usually you pay for it. here it’s free. for whoever has eyes to read and patience to understand. so thank you “l33t web developers” for taking the time.

Maybe you should read my post; where did I say that I don’t learn anything from read their posts? I certainly do. I love Sitepoint and have learned lots from this site.