Forum Moderators: open
We are a local government organisation currently using Visual Studio .Net 2003 to develop web applications (using HTML4.01 transitional). We are shortly moving to VS2005 and was wondering if we should take the plunge with XHTML?
If so should we go for 1.0 or 1.1, and strict or transitional? From what I've read so far, people seem recommend against using 1.1 due to lack of browser support. Is that correct? The general consensus so far seems to be "go for XHTML 1.0 strict". (Just to make it clear, this would only apply to all future developments - we wouldn't be migrating existing apps).
I understand most of the implications of moving over to XHTML. What worries me is that it will be such a big shift in the way we develop web pages. We currently make heavy use of deprecated tags and attributes, especially stuff like tables for page layout purposes, and only use basic CSS due to lack of knoweldge here.
The thought of trying to create (say) complex a data entry form using just DIVs and CSS fills me with dread! And no two pages are rarely the same, so I can't imagine being able to offer or control all these layout permutations using CSS.
Perhaps I should be coming at this with the intention of using XHTML as an opportunity to tighten up on what developers can and can't do, i.e. using a company-wide CSS which offers a more restricted set of styles to control how pages are arranged?
I wonder if others here have gone through the same experiences/learning curve, and what hints and tips you folks can offer?
Thanks in advance
Andy
Here are some threads that might help:
There are quite a few threads on this topic. The site search [webmasterworld.com] is your friend. ;)
The links given by bill above should give a good overview of the situation. I'm one of many members here who have gone the full-circle - from transitional HTML to XHTML to strict XHTML with mime-type switching, only to return to HTML 4.01, either Strict (if possible) or Transitional where required. Thing is, there is a total lack of real benefit for using XHTML over HTML 4.01.
There is one aspect which could affect your choice which may not be well-covered in the above discussions - that is your choice of development tool. I'm not familiar with Visual Studio 2005 (I'm strictly a Linux-based developer), but I believe VS creates generated markup in certain situations when developing in .NET. If you want to use such generated markup, you will find it easiest from a development perspective if you choose between HTML and XHTML syntax in relation to the type of markup generated. For example, if VS2005 produces XHTML syntax such as
<br /> or similar, then you should use a XHTML doctype, but of course continue to serve the result as HTML with the standard text/html MIME type (as IE doesn't support anyything else). This will make it easier when validating your markup [validator.w3.org]. Bear in mind that XHTML does not necessarily equate to a CSS-P-based layout, in the same way that HTML doesn't necessarily mean a tables-based layout. XHTML 1.0 Transitional contains all the same
font tags and tables as HTML 4.01 Transitional. So the tables versus CSS issue is another debate entirely. :) Ideally, given your stated situation of dealing with tables-based layouts, I would recommend sticking to HTML 4.01 Transitional, but using a full doctype [webmasterworld.com] which triggers standards-compliance mode [webmasterworld.com] in all modern browsers. If you want to go down the CSS-P route (and I recommend this entirely), then try to validate against HTML 4.01 Strict rather than Transitional, as during the validation process the lack of deprecated elements and attributes will help you move your presentational markup into CSS.