Topic: Use Tripoli with XHTML 1.0 Strict
Can I use Tripoli with XHTML 1.0 Strict, or is it just for HTML 4
Pages: 1
Can I use Tripoli with XHTML 1.0 Strict, or is it just for HTML 4
Hi masarin,
Tripoli can be used in any version of HTML / XHTML (even 3.2). But I always recommend HTML 4 strict when coding web sites for various reasons. The only thing that might be an issue is that tripoli requires a legend in each fieldset, just like the HTML 4 specifications tell you. But XHTML is moore loose and does not require a legend. So, by using XHTML you might skip the legend and still produce valid pages, though tripoli could render your form differently in IE vs. standard browsers.
I've tried using Tripoli with XHTML 1.0 Strict, and the results were fine. I didn't get any problems with fieldset/legend (used them both
), and, as far as I can tell, the only problem is if the designer guy is lazy enough to put both these tags on page.
David, how come you are using HTML 4? I don't want to defend XHTML, but this looks very strange (not many people use HTML 4 nowadays).
how come you are using HTML 4?
Mainly because serving XHTML requires the MIME type application/xhtml+xml. And serving that to IE will set the browser in quirks mode. On the other hand, serving XHTML as text/html will simply produce broken HTML. Quirks mode is no good, tables will not inherit body font sizes, paddings/margins are calculated differently etc.
HTML 4 strict is a good standard and I never understood the benefits of mixing XML with HTML. I believe w3 is discontinuing the XHTML path and instead focusing on HTML 5.
I have heard that the specification of any XML MIME type, including application/xhtml+xml, automatically triggers standards mode; any known XHTML DOCTYPE sets IE6/Win, IE5/Mac and NS6.x to standards/strict.
http://reference.sitepoint.com/css/doctypesniffing
Is this incorrect, or am I overlooking something?
The direction of w3 seems to be to adapt to tag soup by "Creat(ing) independent but related languages for different audiences."
http://www.w3.org/2007/03/vision
Hi quantumgood
application/xhtml+xml automatically triggers standards mode
That is true for standard browsers (FF/Opera/Safari). IE will simply ask you to save the file (including IE8). In addition, if a doctype that triggers strict mode is preceded by an xml prolog, IE6 will go into quirks mode anyway.
any known XHTML DOCTYPE sets IE6/Win, IE5/Mac and NS6.x to standards/strict.
Not quite, any valid DOCTYPE sets user agents into standards mode, including HTML and XHTML. A valid doctype includes a full URI (Start, Public identifier & System identifier)
i have found a solution to this problem. okay, it is based in microsoft asp technology, but it represents a good example of how we can achieve valid rendering for all browsers.
' this is for browsers
if instr(1, request.servervariables("HTTP_ACCEPT").item, "application/xhtml+xml") > 0 then
response.contenttype = "application/xhtml+xml"
else
response.contenttype = "text/html"
end if
' this on for w3c validator too
if instr(1, request.servervariables("HTTP_USER_AGENT").item, "W3C_Validator") > 0 then
response.contenttype = "application/xhtml+xml"
else
response.contenttype = "text/html"
end if
comments?
Posts [ 7 ]
Pages: 1
You are not logged in. Please login or register.