SitePoint Sponsor

User Tag List

Page 2 of 6 FirstFirst 123456 LastLast
Results 26 to 50 of 134
  1. #26
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,109
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by optl View Post
    Thanks for the support man. People seem to have deviated from the original question just so they can make me look bad. I hope that's not the case. Let's get this thread back on track.
    I wouldn't say that's what people have done in this thread.

    I simply haven't had a need for a <center> tag or a presentational class like 'centerme' ever. As Tommy illustrated there is usually markup that allows you to only add contextual css to achieve centering which is far less typing if you use it more than once.

    It's not that they're trying to make you look bad, they've been at it a very long time and know what to avoid.

  2. #27
    SitePoint Addict Jack Matier's Avatar
    Join Date
    Feb 2005
    Posts
    292
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    optl, I see your point that <center></center> is less work than writing up the equivalent in css CSS:

    Code HTML4Strict:
    <center><h1>My nice centered title</h1></center>

    (17 characters, simple code) is less than (22+ characters, more complex code)
    Code CSS:
    h1 { text-align:center; }

    But as soon as you have to do this to 3 pages it loses the whole concept of it being "less work" doesn't it? And I'm not even taking into account changing things into the future.

    As for screen readers, I haven't used one in a while but I think in terms of that it would make sense that they would completely ignore the center tag element so there should be no problem there.

    Otherwise I tend to agree, it's deprecated because it's a style element rather than a descriptive one and that simply doesn't belong in html.

  3. #28
    SitePoint Evangelist Ed Seedhouse's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, B.C. Canada
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the reason CENTER is deprecated in strict document types is simply that it is presentational, and presentational tags were removed from STRICT doctypes. That is just a fact.

    It was done because the designers of html decided that presentational tags in html are a bad thing. Now if you want to argue in favour of presentational tags in strict doctypes feel free. But it has nothing to do with "why" CENTER is deprecated.
    Ed Seedhouse

  4. #29
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Ed Seedhouse View Post
    Well, the reason CENTER is deprecated in strict document types is simply that it is presentational, and presentational tags were removed from STRICT doctypes. That is just a fact.
    It isn't just a fact as there was a very good reason why it was done. Separating out the presentation makes it a lot easier to apply different presentation to different media and also makes changing the presentation much easier.

    Getting rid of the presentation from HTML and applying it separately via CSS can reduce months of work down to a few minutes on large web sites and results in significant time saving even on smaller web sites.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #30
    SitePoint Wizard bronze trophy conradical's Avatar
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    2,354
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Yes is shorter. If it is for just that one instance, your fingers would actually type fewer characters than if you were to do it with CSS. Yes, it is shorter. You are right. Good luck.

  6. #31
    SitePoint Evangelist optl's Avatar
    Join Date
    Oct 2004
    Location
    Washington DC
    Posts
    415
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by conradical View Post
    Yes is shorter. If it is for just that one instance, your fingers would actually type fewer characters than if you were to do it with CSS. Yes, it is shorter. You are right. Good luck.
    Thank you. That's all I was trying to say. I would never use <center> in any real life situation for reasons stated by others in this thread.
    For the phrase "Bethesda home architect", my clients
    websites occupy 6 of the first 8 results
    on the 1st page of Google. My Secret SEO Strategy Revealed

  7. #32
    SitePoint Zealot
    Join Date
    Jul 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a fact.

    :forehead slap:
    :rolled eyes:
    :exasperated groan:

  8. #33
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    Though I've no idea how you think the below seems like more code than center tags stuffed everywhere

    Code CSS:
    .items{
          align: center;
    }
    You made me think for a second that I'd be doing CSS centering the hard way for all these years, but my suspicions of your example were correct. "align" is not a valid CSS property.

  9. #34
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by optl View Post
    There you go; a real world instance where the center tag would increase the page load speed.
    Right. Now show me were a difference of 31 bytes would make a noticeable increase in page load speed.

    If you have a billion visitors a day, I can understand that saving 31 bytes per visit (31 GB/day) could make a difference in cost. But the benefit to the visitors would be negligible.
    Birnam wood is come to Dunsinane

  10. #35
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Right. Now show me were a difference of 31 bytes would make a noticeable increase in page load speed.

    If you have a billion visitors a day, I can understand that saving 31 bytes per visit (31 GB/day) could make a difference in cost. But the benefit to the visitors would be negligible.
    Of course if there are thousands of pages then the saving no longer exists and instead you have added a huge amount to the cost of mainitaining the site. You'd only get that saving with a one page site and billions of visitors a day.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  11. #36
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The <center> HTML/xHTML tag

    The <center> tag is used to align content in the centre of it’s parent element..

    <snip/>
    Last edited by ScallioXTX; Jun 23, 2010 at 01:07. Reason: removed fake signature - wait a total of 90 days to expire to avail of a signature

  12. #37
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, how ridiculous and utterly pointless has this discussion become?

    It's not hard to see the benefits of separating concerns. That's why it's so popular in the programming world. Unfortunately, the current HTML, CSS and JavaScript technology stack doesn't do a very good job of separating concerns, although it tries hard. I'd say that this is the main reason why tags such as <center> and <b> have been deprecated. If it can be done with a stylesheet, then the same functionality/capability SHOULDN'T also exist in HTML.

    But besides the advantages of separating concerns, and the fact that the tag has been deprecated, the other reasons not to use it have already been peppered throughout this article. By keeping all visual mark-up in stylesheets, maintenance becomes easier and bandwidth is saved.

    If you have a single page site, and couldn't give a crap about the fact that the center tag is deprecated, then why not use it. After all, you'll save a few seconds which you can put to good use, such as sleeping.

  13. #38
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wardrop View Post
    I'd say that this is the main reason why tags such as <center> and <b> have been deprecated.
    FWIW, <b> is not deprecated. It's still allowed if you want to adhere to some typographic convention for which there is no semantically appropriate element type.

    Quote Originally Posted by Wardrop View Post
    After all, you'll save a few seconds which you can put to good use, such as sleeping.
    Or learning proper web developement
    Birnam wood is come to Dunsinane

  14. #39
    SitePoint Evangelist Ed Seedhouse's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, B.C. Canada
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    It isn't just a fact as there was a very good reason why it was done.
    I certainly agree the reasons were good. Very good indeed.

    But that's beside the point if we ask only the narrow question of "why" the CENTER tag is deprecated, which is what the OP titled this thread.
    Ed Seedhouse

  15. #40
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    O key, Dear


    The <center> tag has also been used to center tables and other structures within the page, not just text. This use of tables is also now deprecated. Tables are to be reserved for tabular data - for those situations where two or more columns and two or more rows of data need to be displayed in a grid. The days of using a single cell table with hidden borders to position text within the page have gone. Generally, as on this page, for a table to be required the content should demand to be divided into visible columns and visible rows.

    <snip/>
    Last edited by ScallioXTX; Jun 23, 2010 at 01:10. Reason: removed fake signature - wait a total of 90 days to expire to avail of a signature

  16. #41
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by nancyjones View Post
    This use of tables is also now 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.

  17. #42
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by nancyjones View Post
    The days of using a single cell table with hidden borders to position text within the page have gone.
    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.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  18. #43
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Quote Originally Posted by xhtmlcoder View Post
    Maybe one or two of you were probably been overly critical of her grammar and sentence structure in #40.
    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.

    Everyone, please, don't feed the trolls!
    Birnam wood is come to Dunsinane

  19. #44
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    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.

  20. #45
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  21. #46
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    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).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  22. #47
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    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&#37;+ 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

    Quote Originally Posted by Ian Lloyd
    ... after a shopping trip when I stepped into a local book shop. While my wife was looking at clothes I started leafing through some of the HTML Beginners books and I was frankly quite shocked at what I saw. Nearly every book that I looked at was recommending techniques that most professional web designers have long since abandoned and I'm talking about techniques like using tables for layout -- but that was just the tip of the iceberg. With each new book I picked up off the shelf, I expected and hoped to see something better. Every single book that I picked up seemed to just get worse and worse!
    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!

  23. #48
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  24. #49
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noonnope View Post
    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.

  25. #50
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    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.
    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.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •