Forum Moderators: open

Message Too Old, No Replies

What do guys think? Leave as xhtml or change to html?

         

ewwatson

2:13 pm on Dec 27, 2007 (gmt 0)

10+ Year Member



What do guys think? I have just noticed that a few of the pages throughout the website that I am working on have a xhtml transitional doctype and the rest have none. I would like to add a html transitional doctype to all the web pages - just working out all the kinks before I do. And oddly enough I can't find any info pertaining to this question on the web.

I assume it's probably not recommened to have a mix of doctypes (or is it?). And, what do you think, leave the few xhtml doctypes as xhtml or change them all to html doctypes? For the most part without being re-done the site will only take an html transitional doctype (with the exception of a few). Thanks a lot! Keep in mind, I did not build the website - only fixing it.

piznac

3:41 pm on Dec 27, 2007 (gmt 0)

10+ Year Member



Technically speaking (I think) it wont matter if you have multiple doc types. Each doc type is for that indiviual page or document. But from a developers point of view I would make them all the same if they are all the same(if that makes sense) ,.. but to get to the point I don't think you would have any trouble making them all trans html,.. if you were going the other way it might be a bit tricky (trans html is very forgiving IMO). I would just try it test it in a few browsers and roll with it. If Im wrong someone please correct me :)

rocknbil

6:48 pm on Dec 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume it's probably not recommened to have a mix of doctypes

Does not matter. Pages are all called and crawled individually, won't hurt a thing.

And, what do you think, leave the few xhtml doctypes as xhtml or change them all to html doctypes?

This decision is really yours in that it depends on the time and budget to perform the task of unifying the documents. In terms of overall maintenance, I would make them all the same, and unless I have a very good reason for using XHTML, I would not make them XHTML. XHTML has a specific application and it's not what most people think. Unless I perform functions that require an XHTML doctype, I'd go with 4.01 strict or transitional.

Xapti

4:28 pm on Jan 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Whether you use different doctypes only matters if you are using the templates and CSS for the different pages. If the different doctype pages use different templates (most likely) then it's not an issue.

The doctype you use should depend on your content... whether you need xhtml functionality, and whether you use depreciated tags. If you like iframes, or some depreciated tags and attributes, you should consider using transitional doctype, otherwise strict would be a good choice. Mostly likely you would not need xhtml functionality, so it would just be html 4.01 until html 5 gets implemented (quite a while)

You said "the rest have none", meaning no doctype at all? that's something you probably don't want now-a-days because it runs in quirks mode, which varies on different browsers, and does not follow the web standards, so it's unpredictable.