[Phpwm] new ste

Phil Beynon phil at infolinkelectronics.co.uk
Thu Feb 15 01:40:14 GMT 2007


> >> To make the validator work all you need to do is replace your
> previous dtd
> >> and html opening tag with (note the dtd and xml definition are
> the first
> >> thing on the page):
> >>
> >> <?xml version='1.0' encoding='UTF-8'?>
> >> <!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' lang='en' xml:lang='en'>
> >>
> >
> > I've not noticed the <?xml thing all that often; is it often not used?
> > Or do few people bother reaching that standard?
> >
> > (<? also has that annoying property of being the equivalent of <?php on
> > some stupid servers, and is quite annoying when you find it in 3rd party
> > code).
> >
> > David.
> >
> In my limited experience with XHTML I have not used the initial <?xml
> .... ?> line and my pages have validated successfully as XHTML 1.0
> Transitional with the W3C validator, the WDG validator and the Total
> Validator.
>
> The W3C XHTML1.0 standard, at http://www.w3.org/TR/xhtml1/, says "An XML
> declaration is not required in all XML documents; however XHTML document
> authors are strongly encouraged to use XML declarations in all their
> documents. Such a declaration is required when the character encoding of
> the document is other than the default UTF-8 or UTF-16 and no encoding
> was determined by a higher-level protocol."
>
> So that probably explains why we can get away with omitting the <?xml
> ... ?> stuff even though we should include it!
>
> Best wishes,
>
> Peter Crouch
> -------------------------------------------------
> Tel: 0121 523 6756
> E-mail: pccrouch at bcs.org.uk
>

Well I've got the homepage passing as XHTML 1.0 transitional. Everything
scooted left a bit though.

So is that what I should be aiming for, because I see on the W3C site it
also mentions XHTML 1.1 and 2.0 ??

Also as I understand it the main difference with 'strict' and 'transitional'
is its where you can't use certain tags or elements - such as align -
anymore and all these functions should only be within the CSS.
How many people are writing for 'strict' on an `aim to use strict in
everything` approach?

Phil




More information about the Phpwm mailing list