Msg#: 4542905 posted 10:53 am on Feb 6, 2013 (gmt 0)
I have checked some DOCTYPE's and it seems largest website did not transform XHTML to HTML5. 1. Is it the best way to use: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xlmns:og="http://ogp.me/ns#" xlmns:fb="..." class="">
Use inside DOCTYPE: [ogp.me...] 2. Use <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="robots" content="index, follow, noodp" />
but avoid <meta charset="utf-8"> as HTML5
3. Use of [modernizr.com...] that detects support for many HTML5 & CSS3 features.
Msg#: 4542905 posted 12:19 pm on Feb 6, 2013 (gmt 0)
Haven't a clue what you're asking.
1) No one should be using that doctype for new web pages since 1999.
2) The first meta isn't needed on the web, only for pages that are saved. The second isn't needed except for some IE nonsense that doesn't belong. The third isn't needed by most sites except in certain situations.
Msg#: 4542905 posted 4:30 pm on Feb 6, 2013 (gmt 0)
largest website did not transform XHTML to HTML5
They may have their own reasons, for example they may be using a Content Management System (CMS) like Wordpress, Drupal, etc., that uses XHTML and it's not worth the work to modify their templates (if it's not broke, don't fix it). Or perhaps they're using a facebook extension that uses the Open Graph requires XHTML, and switching would cause those to stop working or would require extra work to convert.
1. Is it the best way to use:
Which DOCTYPE you use depends on your needs. If you're going to use XHTML 1.0, you probably don't want to be using the Transitional doctype. Transitional is intended for legacy sites that are still using deprecated HTML attributes that have been replaced with CSS alternatives, to allow them some time to make the changes to use CSS for presentation. It's not intended for new sites.
2. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> vs. <meta charset="utf-8"> There's a good explaination here: [diveintohtml5.info...] All browsers support the shorter version, so if you're using HTML5 use that.
3. Use of modernizr.com...
Is there a question here? If you're doing HTML5 (and even if you're not), Modernizr is great and very useful.
4. Media Queries for Responsive Design suggested by
Responsive Design is starting to get more traction now. It's not specific to HTML5 though.