chromatic_aberration mumbled the following on 01/02/2006 18:23:
> Gazza wrote:
> > It doesn't hurt to have these close these empty elements, but it
would
> > be best to either use an XHTML DTD, or stick with /plain/ HTML.
>
> You can't always do that. Some PHP functions insert <br/> and <img/>
> regardless of the DTD in use.
Care to mention what functions they are? The nl2br() function has the
following note:
Starting with PHP 4.0.5, nl2br() is now XHTML compliant. All versions
before 4.0.5 will return /string/ with '<br>' inserted before newlines
instead of '<br />'.
Nowhere does it mention about returning '<br/>' and I can't think of any
built-in function that returns '<img/>'.
>
> That said, I usually stick to HTML 4.01 because of the MIME type issue
> in XHTML... but that's an other topic.
XHTML 1.0 Strict MAY use text/html as the MIME type - there's no issue.
Once you move onto XHTML 1.1, then you SHOULD be using
application/xhtml+xml, and SHOULD NOT be using text/html.
See <http://www.w3.org/TR/xhtml-media-types/#summary>.
--
Gazza
Mobile Number Network Checker - http://mnnc.net/
Leovanna Leonbergers - http://leovanna.co.uk/
Scarlet Town - http://scarlettown.co.uk/


|