/    Sign up×
Community /Pin to ProfileBookmark

HTML5 or XHTML

Hi there,

We get our new corporate website coded in HTML5. However it might not work good on some browsers. Do you think it is “safer” in terms of the good performance and user experience to use XHTML?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@Jeff_MottJun 28.2011 — XHTML is long gone and dead. Even if you use an XHTML doctype and add the self-closing slashes, every browser will still parse your page as if it were plain old HTML. So no, it isn't any safer.
Copy linkTweet thisAlerts:
@HostColorauthorJun 28.2011 — Thanks. So it is worth to use HTML5, isn't it?
Copy linkTweet thisAlerts:
@MarPloJun 28.2011 — Hy,

With HTML5 you can use both HTML or XHTM syntax.

Also, include in the HEAD section of the page these two codes:

[b]<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->[/b]

And:

[b]<style>header, footer, section, aside, nav, article {display: block;}</style>[/b]

Useful to make IE to recognize some new HTML5 tags.
Copy linkTweet thisAlerts:
@tracknutJun 28.2011 — I will disagree with the trend and say no, html5 is not "safer" by any means. It is a new spec, not even ratified yet, and browser developers are trying to keep up with the moving target. Being an early adopter or beta tester is not "safe". Safe would be using HTML 4 or XHTML 1 Strict, as the standards have been out for a long time and browsers are pretty compatible.

Dave
Copy linkTweet thisAlerts:
@Jeff_MottJun 28.2011 — Thanks. So it is worth to use HTML5, isn't it?[/QUOTE]

To the extent that it's cross-browser compatible, sure. But with IE 6, 7 and 8 in the mix (and to some extent, IE 9 as well), that doesn't leave you with much. HTML 5's biggest contribution has been the <video> tag, and even that's used almost exclusively for the iPad, since it doesn't support Flash.

As MarPlo pointed out, you can still use XHTML syntax. Though, those extra slashes don't come with any benefit. And yes, with some JS and CSS magic, you can make IE recognize the newer HTML 5 elements. But I haven't heard anything from Google saying that <article> is more SEO friendly than <div class="article">. So, again, not a whole lot of benefit.
×

Success!

Help @HostColor spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...