Hi,
I am developing a site for viewers in Europe.
I'd like to decide on the proper doctype declaration:
- What is Adobe's view on this question
<or>
- What would W3C officially recommend for me?
Maybe it isn't that straightforward to answer, so my priorities:
- The site has to render quickly, smoothly, and must look nice.
- I am targeting older browsers too as long as they are used by people
- Mobile devices can be a nice addon, but not required
Thanks.
I found on the web different answers for my problem,
some would say XHTML strict or HTML5. Adobe help
currently tells me XHTML transitional, i don't know
if that info is uptodate now (2012 june).
First, this is a user-to-user forum. You won't get an official opinion from Adobe or W3C here.
Doc type depends on what you're doing.
If you want to take advantage of the newer HTML5 tags and support older browsers, you need to add a conditional comment for pre-IE9 with a link to the HTML5 Shiv script on Google's servers.
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
I generally recommend that people choose a doctype that is consistent with their coding skills. Most often, this is HTML4.01 Transitional, which although long in the tooth is still a valid choice. If your skills allow upgrading that choice, then I would choose HTML5, but that's me. There is little practical benefit to XHTML other than a) the rigor, and b) the tight coupling with any use of XML in your methods.
XHTML stands for Extensible Hyper Text Markup Language. Ironically, XHTML has never been extensible. It is restrictive, as Murray has eluded to, forcing developers/designers to work more precisely, having to address issues such as
Although HTML is more forgiving, there is no reason not to apply the same discipline to HTML documents.
Many articles have been devoted to the pro's and con's of each language. With the exception of a few minor issues (e.g. larger file size for XHTML due to the empty element termination), there are no performance differences.
Having established that there is no reason not to use HTML, there is no reason why you cannot start using the HTML5 doctype right now. Consider the two following declarations
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
and
<!DOCTYPE html>
Both declarations will handle the exact same markup. In HTML5, the validator may issue a few warnings such as the unnecessary use of the type attribute as in
<script src="myScript.js" type="text/javascript"></script>
but the markup will work.
Using semantic markup is an added advantage when developing in HTML5, not necessary, but it does open new opportunities in preparation for the future.
Gramps
Thanks everyone.
What I understand here is that HTML5 will understand HTML4.01,
thus I will not lose a thing with using HTML5 except that I could end up using some feature,
I would not think it exist. Which does not seem to be a problem, as I am not using meaningless HTML tags.
Actually, I was never fond of the <br /> style. (Maybe it is just me though.)
So I go HTML5, and I hope I will not end up making some bug because I dont know the tiny bits of HTML5.
Before you decide to use HTML5, you should learn the new tags and what they do.
http://www.w3schools.com/html5/html5_reference.asp
Nancy O.
You might want to look at this ![]()
The key issue for the typical Dreamweaver user inquiring about HTML5 is
that for them it simply involves new tags that, on their own, do
absolutely nothing. The use of a script simply allows old versions of IE
to do what old versions of the Netscape/Mozilla tree have always done,
and that is to associate CSS rules with any tag - real or made up.
The cool stuff requires JavaScript but does not even require an HTML5
DOCTYPE ![]()
--
Al Sparber - PVII
The Finest Dreamweaver Menus | Galleries | Widgets
Since 1998
AdobeUserHun12 wrote:
Seems you are suggesting me that if I'd like to code cross-browser compatible,
I have to use the script Nancy mentioned in her first post. Am I right?
That w3fools link was partly interesting/partly a religion war, as far as my perception goes.
If you want to take advantage of the new html5 tags such as aside, header, section, naviagtion then you need to use the shiv script so IE below 9 will recognise them.
AdobeUserHun12 wrote:
Seems you are suggesting me that if I'd like to code cross-browser compatible,
I have to use the script Nancy mentioned in her first post. Am I right?
As Osgood says, only for Internet Explorer versions earlier than IE9.
The script merely ensures that earlier IE versions can recognise HTML5 tags.
AdobeUserHun12 wrote:
That w3fools link was partly interesting/partly a religion war, as far as my perception goes.
Same here. It's a sideshow.
It's usually posted when people are being mischievous.
North America
Europe, Middle East and Africa
Asia Pacific