SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New website: HTML5 or XHTML

    I have a school project where we have to make a website for a client with a real-life issue (eg a business, organisation, etc.). And one of the requirements is to use a variety of resources like questionnaires, surveys, telephone interviews, emails, etc. for researching. Right now I'm at the stage where I'm starting to develop my final solution. I need to decide whether to stick with the old, stable XHTML or go with the new, hyped up HTML5 (leaning towards HTML5). I need your help guys. Here is my survey:

    Software Usage at Work (Survey)

    Please fill in this survey.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Hi neojiphre. Welcome to SitePoint.

    There's no need to change your HTML 4.01 strict doctype. It's completely up to date. There's no advantage in using XHTML (which, in most cases, is just fake HTML anyway, because IE 8 and below doesn't support true XHTML, so hardly anyone uses it). HTML5 is still too young to use properly; it's embryonic, so to speak, and no one knows what it will really look like when born. To use it now, you basically need a life support system, just as for a premature baby.

    Put your efforts into learning the syntax rules of HTML. That will stop you using break tags between divs etc.

  3. #3
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Agreed, Ralph. Right now HTML 5 is still in fetal development, and to my mind not ready for prime time yet. Besides, many users have browsers that won't handle HTML 5 properly. If you're coding for a general audience, I can't see using HTML 5 just yet.

  4. #4
    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)
    Use something fully normative. ;-)

  5. #5
    SitePoint Guru JoePrice's Avatar
    Join Date
    Jan 2002
    Location
    UK
    Posts
    673
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, it's worth learning about html5 nevertheless even if you don't decide to make your site in it. It will become more popular in time, and from an employment perspective, you do see more and more jobs being posted asking for someone who knows html5.

    I *think* you can create a site in html5 and use javascript or whatever to make it work in browsers that dont support it. That probably needs clarification however....

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by JoePrice View Post
    I *think* you can create a site in html5 and use javascript or whatever to make it work in browsers that dont support it. That probably needs clarification however....
    Yes, that's what's happening at the moment. And yes, it's worth getting to know HTML5 now, for various reasons—though it's important to keep up to date with it, as some things in it now may well disappear, such as hgroup.

  7. #7
    SitePoint Member wwl777's Avatar
    Join Date
    Aug 2011
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I like to use the html5 and css3, because I think you can already use them with a bit of support. Take a look at something like modernizr.com.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    At the moment HTML 4.01 is the latest version that all browsers support.

    Once IE8 dies you would then be able to consider XHTML5 (at least with the add ons to XHTML 1.0 that the browsers actually support).
    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="^$">

  9. #9
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    modernizr.com well designed and simple website based on html5 and css, I didnt work on html5 yet but I think it's time to start it now thanks guys

  10. #10
    SitePoint Member
    Join Date
    Aug 2011
    Location
    Victoria BC Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Neojiphre I would check out the HTML5 Boilerplate created by Paul Irish and his crew. Although others say that HTML5 is "not ready for primetime" it is still a pretty good education to read through the boilerplate.

  11. #11
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Neojiphre I would code it in HTML 5. I have just finished reading a couple of books and I highly recommend them. "Hardboiled Web Design" by Andy Clarke and "HTML 5" Up and Running" by Mark Pilgrim.

    There is Javascript work around that will make your HTML 5 render in all browsers even IE6. You can find the tutorial here: How to Make All Browsers Render HTML5 Mark-up Correctly - Even IE6 | Nettuts+

  12. #12
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Just remember that HTML5 is still a moving target - what is in it this week may be changed next week.

    The last time a lot of people started coding for an unfinished standard, the standard was subsequently changed and IE had to implement quirks mode for all the web pages that followed the old proposed version instead of the actual final standard. So in a few years time if there are lots of HTML5 pages that follow the current proposal instead of the final standard then all the browsers will need to implement a new mode for all those pages.

    For the most part HTML5 is just HTML 4 with a few extra tags and attributes = if you write using your pages semantically then most of them will not use the extra tags (other than the ones that break the page up into meaningful sections - and if you define those as divs you can just do a global replace later).
    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="^$">

  13. #13
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    4 Thread(s)
    Here is the thing, most of the HTML elements added by "HTML5" are unnecessary. The proposed elements of "HTML5" such as; nav, aside, section, etc do not need to be used to a have a "HTML5" website. In fact you can validate against HTML 4.01 and when finished merely change the doctype and instant "HTML5" buzzz word good ness! – without the possibility of anything breaking in the future. The only thing that separates HTML 4.01 from HTML5 is the doctype. Otherwise, valid HTML 4.01 is valid "HTML5". So to sum up use a HTML 4.01 strict doctype during development. Then if you must drop the "HTML5" buzz word change the doctype, it really is that simple.
    The only code I hate more than my own is everyone else's.

  14. #14
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by oddz View Post
    Then if you must drop the "HTML5" buzz word change the doctype
    The HTML 5 doctype is just the short version of the HTML 2+ doctype that doesn't include the version part of the information and so you can use that doctype with any version of HTML except for HTML 1 and still be valid.
    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="^$">

  15. #15
    SitePoint Member ttocsmij's Avatar
    Join Date
    Jan 2005
    Location
    horseheads
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "HTML5 is still too young to use?"

    "I need to decide whether to stick with the old, stable XHTML or go with the new, hyped up HTML5 (leaning towards HTML5)."

    These fellows make me laugh. Thanks, guys. I needed that.

    Anyhow, let's start with "old, stable XHTML". XHTML is merely HTML 4.01 forced into compliance with XML-like extensions added. Ergo, by definition, XHTML is NOT stable because it can be re-defined and re-programmed on the fly (which is one of the highly-touted "strengths" of XML).

    And now on to HTML5's youthfulness. Hate to break anyone's bubble here but HTML5 is just a few new features on top of a slightly-reworked HTML 4.01 core. HTML5 breaks with HTML 4.01 in a few places: frames (as if anyone was still using them, eh), the font tag, a few formatting tags, and a few tags rarely if ever used. In other words, it's HTML4 re-designed for CSS with a few new features thrown in for good measure.

    So, back to the original question. Learn your programming using HTML 4.01 with a good CSS manual at hand. Format your text using CSS instead of the usual HTML4 tags. Tables are still good (contrary to the opinion a few CSS-ONLY aficionados) but follow the rules, eh. Sitepoint has a number of good books along this line. Also, I can recommend any of Elizabeth Castro's books on HTML/DHTML/CSS. w3schools has an excellent on-line reference as does Sitepoint. Add HTML5 features as you have need. Most are supported by the leading standards-compliant browser now anyhow.

    Start off by installing the latest Firefox, Safari, Opera, Chrome browsers. If you can get Internet Explorer 7, start with that. Windows Vista and 7 users will be forced into a later version (8 or 9, I forget and it doesn't matter). If you have to support 8 or 9 or both, get an extra cheapie system or cultivate a friendship with someone who does.

    Do all your development and initial testing on Firefox (it's the most standards-compliant). When you get where you want to be, start testing your pages on other browsers.

    You will find some things different or non-functional, especially as you get to Internet Explorer. Don't worry. 99.9% of these things can be cleared up by browser-specific tweaks (in extra CSS and/or javascript files) that are merely loaded at page loading time to make the offending browser work properly. There are many places on the 'net to find these "workarounds" so don't despair. Would not be surprised if Sitepoint doesn't have a book or two on the subject as well.

    Using an HTML-aware editor can be a big help. There are many editors out there and, unless you are a true Notepad masochist (not that Notepad is a bad thing), it will pay in the long run to investigate these editors and pick one to get started on. You can always change as your skills / needs dictate. I prefer CoffeeCup HTML Editor myself.

    Most of all, enjoy ... and K.I.S.S.!
    Last edited by ttocsmij; Sep 1, 2011 at 09:53. Reason: missing space and a little advice

  16. #16
    SitePoint Guru bronze trophy TheRaptor's Avatar
    Join Date
    Jul 2011
    Location
    New York
    Posts
    710
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    I agree with the above. But what is the harm of ditching the 4.01 doctype and going with the shorter and simpler HTML5 doctype? You can still code using 4.01 standards, just use a doctype that makes more sense.

    Example:
    HTML5: <!DOCTYPE html>.
    HTML 4.01: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">.

    I've been coding HTML sites for four years and still havent memorized the nonsensical HTML4 doctype.

  17. #17
    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 ttocsmij View Post
    And now on to HTML5's youthfulness. Hate to break anyone's bubble here but HTML5 is just a few new features on top of a slightly-reworked HTML 4.01 core. HTML5 breaks with HTML 4.01 in a few places: frames (as if anyone was still using them, eh), the font tag, a few formatting tags, and a few tags rarely if ever used. In other words, it's HTML4 re-designed for CSS with a few new features thrown in for good measure.
    The problems with HTML5 are two-fold.

    The first is that there are too many browsers out there in the world that don't support it, or don't support all features. I'm not talking about new releases, but what people have installed on their computers and are using. Sure, you're always going to get a few oddballs who are still using IE5 in the 23rd century, and you have to draw the line somewhere, but the dangers of using HTML5 features are still high.

    The second is that the specs aren't finalised, and investing too much time and energy in developing a site to the current draft may leave you flat on your face when the specs change in a subsequent revision, and your site stops working on newer browsers.

    w3schools has an excellent on-line reference
    You were doing so well until that point! W3Schools has a mediocre online reference. It's easy to read and understand, sure, but it's also got more than a handful of mistakes, it's quite outdated and doesn't always advocate best practice. Sitepoint Reference is a much better place to look for accurate information.

  18. #18
    SitePoint Member ttocsmij's Avatar
    Join Date
    Jan 2005
    Location
    horseheads
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    The problems with HTML5 are two-fold.

    The first is that there are too many browsers out there in the world that don't support it, or don't support all features.
    Uh, the core of HTML5 is just HTML4 with frames and some text formatting discontinued (in favor of CSS formatting). Otherwise, unless someone intentionally uses one of the new HTML5 tags, their "HTML5 file" will be perfectly understood by any standards-compliant browser now (and maybe even Internet Explorer but I would not hold my breath LoL).

    Which is why I advised learning HTML4 with all text formatted by CSS. Everything one is learning in this way is in reality, by definition, HTML5. And any work-arounds would be done in external files that could be stripped away as they are no longer necessary without affecting large bodies of code.

    When the more advanced features of HTML5 are reasonably well supported, folks can move on to learn them without having to get past that, "Gee, I have to learn a whole new language?" barrier. They'll already have learned 90% of HTML5 (or HTML6 ... you know committees! ).

    I'm not talking about new releases, but what people have installed on their computers and are using. Sure, you're always going to get a few oddballs who are still using IE5 in the 23rd century, and you have to draw the line somewhere, but the dangers of using HTML5 features are still high.
    This is not the issue it once was, at least in the Windows world. The tight integration and rabid desire to possess the Internet have caused Microsoft to force users to upgrade their Internet Explorer as they move through OS versions. My understanding is that Windows 7 forces the user to IE 8 and the next OS release will force IE 9 on the user. I could be wrong here as I'm still glued firmly to good old XP SP3 and IE 7 (for testing only). Rock solid and runs like a champ. My basement computer has been running 24x7 now for 6 months without a restart. Try that with Win Vista or 7. LoL.

    As regards standards-compliant browsers, they continually update themselves so support for new features is always being added or improved. Frankly, IMHO any developer who isn't developing to Firefox 3.6 or 4 and "work-arounding" for the rest is just doing a whole lot more work than they need to. Sure, that could change but it hasn't yet to my knowledge.

    The second is that the specs aren't finalised, and investing too much time and energy in developing a site to the current draft may leave you flat on your face when the specs change in a subsequent revision, and your site stops working on newer browsers.
    Sounds like you've had quite a few problems with Internet Explorer over the years. No duh! You have to keep in mind that IE was not designed as a browser so much as a marketing tool to herd users into the Microsoft fold. Why do you think they integrated it so tightly into their OS product and force corporate organizations to use it (because only IE can properly log into a Microsoft corporate server domain as it requires some extremely non-compliant HTML coding).

    And I suspect if one waits for finalized specs, one's pages will be nearly obsolete before they are released. I was using HTML4 code years before it was finalized.

    I doubt that standards-compliant browsers will ever actually discontinue support for frames and other common HTML4 tags if only because there are so many of these pages out there. That is one reason I stay away from exotic tags unless they degrade peacefully and the Customer really really really wanted them for some reason beyond my comprehension. LoL

    You were doing so well until that point! W3Schools has a mediocre online reference. It's easy to read and understand, sure, but it's also got more than a handful of mistakes, it's quite outdated and doesn't always advocate best practice. Sitepoint Reference is a much better place to look for accurate information.
    No question, both have their strengths and weaknesses. W3Schools is much easier to navigate, has a live practice panel for nearly all of the tags, and covers a lot more topics. And while the expanded commentary may offer further elucidation and the compatibility tables are nice, Sitepoint is not totally error-free either (check out the description for the ins tag). Both sites are just tools in the toolbox, not mutually exclusive information sources. And, if you do find an error in either, one might assume you would be good enough to report same, just as you would appreciate knowing about errors in your own pages.

    IMHO, "best practice" is highly subjective and often changes with each "expert" that blossoms. I think being open to new ideas is fine but chasing after every single one is nonsense. Didn't I just read a short time ago that the experts are replacing the über-popular "multi-column" CSS template with something new and improved? I say pick something you like and stick with it until you run across something you like better for reasons that actually make sense to you. K.I.S.S. is my guide. But then I don't program any sites like Amazon.com so I can leave all that fancy brain-numbing coding to the freshly graduated CS majors.

    @TheRaptor: I agree. Why muck about with this DOCTYPE stuff anyhow? CoffeeCup HTML Editor just sticks that stuff up there automatically and I don't pay any attention to it after that.

    And now I must really shut up and stop harassing you good folks. I'm sure we all have better things to do -- my wife certainly thinks so -- than kick this topic around more. ciao

  19. #19
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ttocsmij View Post
    Uh, the core of HTML5 is just HTML4 with frames and some text formatting discontinued (in favor of CSS formatting).
    No you are getting it mixed up. HTML4 was introduced in 1997 as a version of HTML 3.2 but without the frames and text formatting tags that HTML 3.2 had. The transitional and frames variants were provided so that those people who wanted to move from HTML3.2 to HTML4 could transition slowly. Most sites are still using a lot of HTML3.2 even though those tags were made obsolete 14 years ago.

    HTML5 is proposing to add a few new useful tags to what already exists in HTML4. It will be many years before HTML5 is finally accepted because of all the idiotic tags some people are trying to get added which either duplicate existing tags or which ought to be done with CSS or JavaScript.
    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="^$">

  20. #20
    SitePoint Enthusiast
    Join Date
    Sep 2011
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML5 or XHTML?

    Well I got my experience with this where I used Dreamweaver's default DOC HTML type file with default DOC signature, just changed coding to UTF-8 unicode and when I started to add my code, CSS file and some javascript and put my page on HTML validation I got result that my page is HTML 5!

    HTML 5 as already ppl said here HTML4 with some new commands which you'll be barley use in near future.

    All you have to do is to just code your HTML pages and if you got strict task to use HTML5 or XHTML commands then use it.

    For most browsers default and most common document type is actually that Dreamweaver's HTML DOC syntax and browsers will render your pages regularly and stable without errors. What DOCUMENT syntax type you got of that depending how some browsers will render your webpage.

    XHTML is modular HTML which means that you can combine HTML with code of other programming languages and some specific data, databases and files. That's how I understood XHTML. Something like "XML for WEB".

    So I thinks it's clear now what you gonna do and use and stick with it. Have a nice time working!


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
  •