开发者

Conversion to HTML5

I have some web apps and I have converted the UI to HTML5. With XHTML Transitional, there were a lot of errors when validating. When I converted the pages to HTML5, most of the errors were reduced and I managed to make the web apps fully validated.

My question is, may this may arise any problems on some browsers. I tested some of the pages which I 开发者_StackOverflow社区converted in all major browsers, being IE8, IE7, IE6, Firefox, Chrome, Opera and Safari and everything seems to be working well.

I am not using any features of HTML5 like canvas and so on. So there shouldn't be any problems with old browsers right? I converted to HTML5 so the web apps would be of the latest version known to the web and most importantly, they would validate correctly.

Is there any problems which might arise which I should be aware of?

P.S. By converting to HTML5, I mean that I changed the doctype from the usual transitional or strict one to just:

<!DOCTYPE HTML>

Thanks


As Jannis said old browsers don't recognize the new html elements.

If you want to apply the best practice for cross-browser compatibility check this link:

http://html5boilerplate.com/


Many browsers still do not understand the <article>,<header>,<footer>,<section> tags. If you are not using them, there will be no problems.

If you are using them, do like this:

CSS:

header,footer,section,article,nav,aside (and every other HTML5 block tag) {
  display:block;
}

Javascript:

document.createElement("article");
document.createElement("header");
document.createElement("footer");
// do so for the rest of the HTML 5 tags.


There is a DRY-solution for the new tags: https://code.google.com/p/html5shim/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜