Recommended HTML5 Beginning Mark-up


 / Published in: HTML
 

  1. <!DOCTYPE html>
  2.  
  3. <html lang="en">
  4. <meta charset="utf-8">
  5. <title>untitled</title>
  6. </head>
  7.  
  8. </body>
  9. </html>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Nettuts on June 25, 2010

Don't be frightened by the name "HTML5." This will work in all browsers -- and is what you should be using right now.

Posted By: gillesmaes on June 25, 2010

I'd recommend using the Google HTML5 javascript and adding the css styling for now, since this will not function as it should...

Posted By: Nettuts on June 25, 2010

@gillesmaes - How will this not function as it should? Older browsers will fallback accordingly.

Posted By: gillesmaes on June 25, 2010

Certain block elements won't show properly when styled. The HTML itself is correct, but then you'll get tons of people wondering why their CSS won't work (assuming you're adding these for educational purposes) :)

Posted By: Nettuts on June 25, 2010

Correct - but just because you use an HTML5 doctype does not mean that you have to use the new HTML5 elements. So this code specifically is perfectly fine. But yes, if you start adding the header, footer, section, article, etc. elements, you'll need to do a bit more work for cross-browser compliance.

You need to login to post a comment.