treehouse : what would you like to learn today?
Web Design Web Development iOS Development

XHTML of HTML5

  • Hi,

    I wanted to build a new statistic page in HTML5 / CSS3, but is HTML5 really necessary ? Is XHTML also ok ?
  • You could code a page entirely as you would in XHTML but set <!doctype html> it will work fine

    Html5 was created to make like easier for us but it's not something forced upon us

    If you are more familiar with older methods you can still still use them on all browsers, not sure if they intend to phase out older doctypes but that's unlikely
  • There isn't really any reason not to use HTML5 these days.

    Start off slowly, getting into the new elements as you feel comfortable. Make sure you normalise the new elements and include the html5 shiv for IE support. (if you're not sure on these, google is your friend).

    As @karlpcrowley mentioned, you can simply use the HTML5 doctype and code the same exact way you would have in XHTML.