homepage Welcome to WebmasterWorld Guest from 54.226.10.234
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
HTML5 and specifications
toplisek

WebmasterWorld Senior Member 5+ Year Member



 
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.

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?

 

drhowarddrfine

WebmasterWorld Senior Member 5+ Year Member



 
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.

toplisek

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4542905 posted 1:28 pm on Feb 6, 2013 (gmt 0)

I do not agree with you. Top website are using this possibilities.

Fotiman

WebmasterWorld Senior Member fotiman us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
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.

toplisek

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4542905 posted 8:17 am on Feb 7, 2013 (gmt 0)

a Content Management System (CMS) like Wordpress, Drupal, etc., do not force XHTML if I understand. There are many HTML5 inside WP...

Fotiman

WebmasterWorld Senior Member fotiman us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4542905 posted 12:13 pm on Feb 7, 2013 (gmt 0)

The doctype is defined in the theme used. But changing it could cause problems with the Open Graph.

seoskunk



 
Msg#: 4542905 posted 1:04 am on Feb 18, 2013 (gmt 0)

For html 5 just use <doctype html>

seoskunk



 
Msg#: 4542905 posted 1:04 am on Feb 18, 2013 (gmt 0)

For html 5 just use <doctype html>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved