Forum Moderators: open
Does anyone know of a list which might tell me which browsers support XHTML and which do not.
Standards are all very well, but I want as many people as possible to see my web pages as I intended, without error messages.
Puzzled newbie.
Just make sure you close the empty tags such as <img>, <br> and others this way:
<br />
This is close to perfect, valid, no-harming xhtml.
Note the space before the "/". If you would write:
<br/>
this would be totally perfect, absolutly valid, but harming xhtml, since old browser could get a serious hickup from it.
Write in the extra space before the closing in empty tags and you're on the safe side.
There are no tags older browser would not understand, if they understand the same tags in html. So for any perfect HTML 4 browser, XHTML is no problem at all.
So if <iframe></iframe> in Netscape 4 doesn't work in HTML, so it won't work in XHTML, since the syntax of the tag is the same. Just as in HTML, the tag will be "overlooked" and only the content between opening and closing tags are being read.
The 'text/html [w3.org]' media type [RFC2854] is primarily for HTML, not for XHTML. In general, this media type is NOT suitable for XHTML. However, as [RFC2854] says, "[XHTML1] defines a profile of use of XHTML which is compatible with HTML 4.01 and which may also be labeled as text/html".
Using any of the current flavors of XHTML doctypes and saving the document with the compatible .htm/.html file extention will tell the user-agent to render the document as text/html - your code will render as any other HTML document, even in older browsers.
However saving your XHTML authored document using the .xhtml file extention will communicate to the user-agent that the document should be interpreted as the media type 'application/xhtml+xml [w3.org]' In this instance current versions of Interent Explorer and the v.4 family of Navigator will experience problems as they try to process an unknown media type.
Please note the following quote from the W3C XHTML Media Types specifications:
'application/xhtml+xml' SHOULD be used for serving XHTML documents to XHTML user agents. Authors who wish to support both XHTML and HTML user agents MAY utilize content negotiation by serving HTML documents as 'text/html' and XHTML documents as 'application/xhtml+xml'. Also note that it is not necessary for XHTML documents served as 'application/xhtml+xml' to follow the HTML Compatibility Guidelines.
Keep in mind that a document that utilizes an XHTML doctype and is presented to the user-agent with an .htm/html file extention is still an HTML document. The difference is that is has been formatted as an XML.
XHTML [w3.org] is a family of current and future document types and modules that reproduce, subset, and extend HTML 4 [HTML]. XHTML family document types are XML based, and ultimately are designed to work in conjunction with XML- based user agents.
The XHTML family [w3.org] is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility.
XHTML is a transition, a migration and evolution of HTML. Don't fear it... learn it!