Posted By

Nettuts on 06/25/10


Tagged


Versions (?)

Who likes this?

34 people have marked this snippet as a favorite

themolitor
Hollow
thatryan
TwItChdw
pixelsoul
gabrield
mogwi
snippork
digitalbart
seanpowell
abir
kwameboame
visudex
kukhtenko
skidmarx
aharl
michellebracken
angel
moopee1176
petemcbride
CJness
stavros
fomigo
NathanFeeser
christianhanvey
qubestream
dayseye49
dubogii
wirenaught
wurstelite
Groobox
nairolf
moasth
Beppoi


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.