[Typo3-dev] TYPo3 3.6.0RC1 and XHTML compliance

Gunnar Wagenknecht g.wagenknecht at planet-wagenknecht.de
Sat Jan 3 09:54:05 CET 2004


"Simon Child" <simondt at gpuk.net> schrieb im Newsbeitrag
news:mailman.1.1072953195.30605.typo3-dev at lists.netfielders.de...

> This reordering is important - without reordering these then css
validation
> (jigsaw.w3.org/css-validator) fails

> With this ordering I can pass both  html and css validation:

> <?xml version="1.0" encoding="iso-8859-1"?>
>      <!DOCTYPE html
>      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>

You might pass a validation test (although I don't see a relation between
CSS validation and the statements above) but you loose browser
compatibility. Some major browser expect the DTD to be the FIRST line in
XHTML code or they will render the document in quirks mode. This small
little difference results in different visible font sizes etc.

IMHO the problem is the line <?...?>. This line is even optional in XML and
not required in XHTML. It should be only used if you are using another
encoding than the defaul XML encoding, which is UTF-8.

See more:
http://gutfeldt.ch/matthias/articles/doctypeswitch.html

Cu, Gunnar






More information about the TYPO3-dev mailing list