SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Location
    London, UK
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quick HTML5 question

    I've read that HTML 5 is still a work in progress and not yet an official standard. (Although, the major browsers support many of the new HTML5 elements)

    Is it then up to individual developers to decide whether or not they want to use HTML 5 elements on their websites. If a developer uses HTML 5 throughout
    their site, is he/she at risk of limiting user experience for those with incompatible browsers?

    Any thoughts would be appreciated.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,868
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The last time a browser adopted a proposal prior to it becoming a standard was IE5 and CSS2. The actual standard ended up slightly different from what IE5 implemented and Microsoft had to find a way to distinguish between their version (quirks mode) and standards mode.
    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="^$">

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Michael I View Post
    I've read that HTML 5 is still a work in progress and not yet an official standard. (Although, the major browsers support many of the new HTML5 elements)

    Is it then up to individual developers to decide whether or not they want to use HTML 5 elements on their websites. If a developer uses HTML 5 throughout
    their site, is he/she at risk of limiting user experience for those with incompatible browsers?
    One risk, as felgall has said, is that the final spec may look different to the drafts that are being used now, so the code you write today may turn out to be wrong and so may break in some/all browsers – it's a bigger risk with CSS than HTML, and it's unlikely to cause major problems, but it's something to be aware of.

    The bigger problem is IE (there's a surprise ). No browsers will have a major strop if you introduce elements that they don't understand and fail to do anything at all ... most browsers treat unknown elements as inline, and allow you to style them even if they don't know what the heck they are. You could use <madeuptag> in your code and have madeuptag {color:red;} in your CSS, and most browsers would turn that text red. And of course, for block-level elements such as <section>, you just need to give them display:block; and you're home and dry. Except ... IE doesn't allow you to do anything with unknown elements, so you can't apply any styling to them. This is where people start to use things like HTML5shiv and Modernizr, which use Javascript to enable IE to work with those elements. But this is a whole lot of code and processing, and is reliant on the user having Javascript running, which isn't guaranteed.

    So for that reason, I wouldn't advise using HTML5 elements for the time being. What you can safely use, on the other hand, are HTML5 form element types, which simply degrade gracefully to plain old <input> if the browser doesn't know what to do with type="email" or whatever else you use.

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Location
    London, UK
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your thoughts and suggestions.


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
  •