Forum Moderators: open

Message Too Old, No Replies

Use XHTML Strict for dev and HTML loose for prod?

         

windy miller

6:16 am on Aug 31, 2005 (gmt 0)



I want to code to XHTML Strict but some clients require adherence to HTML 4.01 transitional for backward compatibility. Does it make any sense to develop against XHTML strict and then switch doctypes at production? That way, when clients finally drop support for older browsers, the switch to XHTML Strict should be relatively easy. What XHTML syntax will cause issues with older (lte IE5)browsers? I tested a couple of pages and the only validation errors seemed to be / in empty tags.

Tx

2by4

6:38 am on Aug 31, 2005 (gmt 0)

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



" I want to code to XHTML Strict but some clients require adherence to HTML 4.01 transitional for backward compatibility. Does it make any sense to develop against XHTML strict and then switch doctypes at production?"

Read your question again - 'I want to code... Are you paying yourself? Or are your clients paying you? Your client wants the site in HTML 4.01 transitional, for good reasons, such as supporting width on table cells etc. Why are you wanting to make it xhtml 1 strict? The code is either 4.01 transitional or it isn't. Saying invalid markup is something it isn't is pretty pointless wouldn't you say?

If you want to do your own stuff in xhtml strict, do it. But your clients I think know why they want that, and that's what you should give them. Any client who actually even knew what 4.01 transitional was would make me very happy.

xhtml declared as html 4.01 is error filled code, it won't validate, and it's just plain silly to do it that way. Listen to your clients, do what they want. If in the future you get a new client, which you might if you make these guys happy, and they have no clue about xhtml or html, and you'll be working on the site always, make it xhtml strict.

Backward compatibility isn't a function of what doctype you say it is, it's a function of what html and attributes you use. A backward compatible website cannot be xhtml/css. If in doubt, take a quick look at this website's page code. This is true, almost 100% backward compatible html.