Forum Moderators: phranque

Message Too Old, No Replies

Best doctype and content-type

         

helenp

4:07 pm on Aug 18, 2011 (gmt 0)

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



Hi,
Have a large website and did the mobilechecker and was advised by W3C that the site is not xhtml and is not utf-8.
I used html 4.01 and iso-8859-1.
So I have been working some weeks on changing the site to xhtml 1.0 transitional and utf-8.
Finally finished and all pages validates on the normal w3c checker (not the mobile one).
And I just read an article saying that using xhtml served as text/html you are dont doing anything but harm......and is incorrect as per w3c, and that the future is html5 or xhtml 2,
so I am a bit confused if I did the wright thing.
What I want is that the site is been viewed the best posible on all devices and all browsers.

Which doctype and content-type is the best at this moment?
I dont need html5 for doing things as flash etc, and to do the xhtml 1.0 strict (hard to validate) then I read I should serve it as xml, can all broswers read that? and what about xhtml 1.1
In my dreamweaver I can easily convert to xhtml 1.0 transitional and strict, xhtml 1.1, and html5.
And what about xhtml 1.1?

If somebody can light all this up I would apreciate it.

rocknbil

4:17 pm on Aug 18, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, if you're not using any features specific to XHTML, there is no real reason to use an XHTML doctype and that article is probably correct - but now that you're "in it" a few weeks, the shortest distance to finishing up is to figure out how to reconfigure your server to serve documents as text/xhtml.

It was predicted that XHTML would replace HTML, but it did not. Moving forward, unless you need XHTML features HTML5 is probably the way to go - but HTML 4 strict or even transitional doctypes will continue to work. Not a major difference, really.

More information in a recent discussion [webmasterworld.com]. This will clarify what I mean by "XHTML features."

helenp

4:49 pm on Aug 18, 2011 (gmt 0)

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



Thanks Rocknbil,
Read the article, and yes same happened to me, been adding things without validating and everything was xhtml, so now my web + the applications I use are xhtml so it validate.

However my concern was viewing the web on mobiles, and I did the mobile test and it said it was not xhtml or utf-8, so I assumed xhtml and utf-8 was the recomendations for mobile devices.
Is this not true?

However now I can see they say xhtml 1.1 and not xhtml 1.0 that I use, so I am a bit confused.

Whats the difference between xhtml 1.0 and 1.1?
Is the 1.1 supported on all browsers?

Tried the html5 but there are issues with ie6 that is dying but is still present.

And yes, we are trying with the bank to charge with creditcard online, so I suppose if we manage to do that, then if I understand you right we will need the xhtml.

lucy24

5:13 pm on Aug 18, 2011 (gmt 0)

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



It depends a lot on your mobile target audience. Insert mental picture to taste. I know, for example, that the iPad can take absolutely anything I choose to throw at it. You may actually get more accurate information simply by opening your file in a browser and seeing what happens if you scrunch the window down to 8, 6 or 3 inches wide :)