willyd57 — 2013-02-28T17:29:46-05:00 — #1
I am developing a simple web site using HTML strict. Now I have a need for 1 page to be written in XHTML strict. The question is, can I simply write one page using a XHTML !doctype statement and make it work with the other HTML !doctype pages?
ralphm — 2013-02-28T17:33:26-05:00 — #2
Yes, the doctype works on a page by page basis. I'm a bit dubious about the idea that one page "needs" a certain doctype. How did you arrive at that conclusion?
willyd57 — 2013-02-28T17:43:22-05:00 — #3
Hi Ralph and thanks for the reply. The last page I am working on involves a photo gallery. I found some very specific advice on how to do that. the example is quite verbose with lots of source code. the author warns that if you do not use XHTML with her examples "lots" of browsers will go into quirks mode and not display images correctly.
ralphm — 2013-02-28T17:58:57-05:00 — #4
She is really warning you against not having a doctype at all. It doesn't matter which one it is, as long as you have one. These days it's the norm just to use the simple (so called HTML5 doctype, though it's not really) doctype:
A few years ago, the fad was to use an XHTML doctype served as text/html, so people tended not even to acknowledge that there were any alternatives, whereas these days, the fad has moved on, just like all other fashions. :lol:
jeff_mott — 2013-02-28T18:51:34-05:00 — #5
I agree with Ralph. If you're serving the page as text/html, then it doesn't actually matter which doctype you use. Browsers treat them all the same.
willyd57 — 2013-02-28T19:05:32-05:00 — #6
cool, and thanks for the clarification.