Welcome to WebmasterWorld Guest from 54.211.82.105

Forum Moderators: not2easy

Message Too Old, No Replies

HTML5 and specifications

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 25, 2006
posts: 1023
votes: 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.

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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 23, 2005
posts:742
votes: 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.
1:28 pm on Feb 6, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 25, 2006
posts: 1023
votes: 0


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

Senior Member from US 

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

joined:Oct 17, 2005
posts: 4988
votes: 12



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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 25, 2006
posts: 1023
votes: 0


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)

Senior Member from US 

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

joined:Oct 17, 2005
posts: 4988
votes: 12


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)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 14, 2011
posts:750
votes: 24


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

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 14, 2011
posts:750
votes: 24


For html 5 just use <doctype html>