Welcome to WebmasterWorld Guest from 54.167.144.170

Forum Moderators: not2easy

HTML5 and specifications

   
10:53 am on Feb 6, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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.

4. Media Queries for Responsive Design suggested by
[html5boilerplate.com...]

Sample:
@media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}

@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}

Is this the best way to combine HTML5 with new devices?
12:19 pm on Feb 6, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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.
1:28 pm on Feb 6, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I do not agree with you. Top website are using this possibilities.
4:30 pm on Feb 6, 2013 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month




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.
8:17 am on Feb 7, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



a Content Management System (CMS) like Wordpress, Drupal, etc., do not force XHTML if I understand. There are many HTML5 inside WP...
12:13 pm on Feb 7, 2013 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



The doctype is defined in the theme used. But changing it could cause problems with the Open Graph.
1:04 am on Feb 18, 2013 (gmt 0)

Top Contributors Of The Month



For html 5 just use <doctype html>
1:04 am on Feb 18, 2013 (gmt 0)

Top Contributors Of The Month



For html 5 just use <doctype html>
 

Featured Threads

Hot Threads This Week

Hot Threads This Month