SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Designer
    Join Date
    Jun 2006
    Location
    Manila
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    So is it safe to build in HTML5 already?

    Thoughts?

  2. #2
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I won't consider HTML5 a viable markup language until
    1. it is an official recommendation and
    2. it is supported natively by all major browsers (to me, that means at least 95 percent of the browser market)

    My guess is that this will happen between 2015 and 2020.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Define safe.

    HTML5 isn't a finished recommendation yet, which means it doesn't exist. You can't write anything that is HTML5. You can write something that adheres to the current draft, which may be invalid a couple of hours from now.

    For a more pragmatic reply: you can use some of the new element types that may become part of HTML5 eventually and that are currently implemented in some fashion in certain browsers. As long as you don't rely on those features, since far from every browser implements them.

    Normal progressive enhancement in other words. With the added risk that your code may be non-compliant and stop working tomorrow or next year.
    Birnam wood is come to Dunsinane

  4. #4
    Designer
    Join Date
    Jun 2006
    Location
    Manila
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tommy: that was basically the idea - using some elements of HTML5 that wouldn't "break" when rendered in current browsers (e.g. <nav>).

  5. #5
    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)
    Well older browsers won't recognise a NAV element as it wasn't an existing element at the time - unfortunately some browsers like IE won't recognise or use elements unless their defined in the browser, rather than simply accepting them even though their considered wrong. I've seen three implementations to make them become noticed, one is using JavaScript (not too graceful) the other uses conditional comments to offer two sets of opening and closing tags (one HTML4 and one HTML5) - or the same thing done with server-side scripting (much better if you can do it) - it is possible to accomplish (in essence) but it requires more code bloating, and you're going to have to maintain your code every time they make a change to the draft - which is time consuming and frustrating.

  6. #6
    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)
    I suppose it really depends upon whether you intend on publishing it in the public domain or not. But like was said it is in a constant state of flux and non-normative and only has "patchy support" for specific parts. So I think the consensus is; it's basically not really ready or practical to use.

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,600
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    If you are writing experimental pages to "test" the proposals to see if they are appropriate for the standard then that should be safe enough since the pages will obviously be intended to be reworked at intervals as the proposal changes based on how it does/doesn't work out.

    For mainstream web pages you should be using HTML 4 which is the current standard and will be for many years to come (although the vast majority of web pages are still in the process of slowly upgrading from HTML 3.2 and there will probably still be many pages using HTML 3.2 in 20 years time).
    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="^$">

  8. #8
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,516
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    HTML5 is safe to use provided that you don't use any HTML5-only elements
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain


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
  •