[Sussex] DTD and encoding ????
Mark Harrison (Groups)
mph at ascentium.co.uk
Mon Jul 11 20:49:59 UTC 2005
On Mon, 2005-07-11 at 19:32 +0100, John D. wrote:
> Probably a dumb question, I'm trying to re-write my "works" site. As
> usual, I'm having to re-learn everything.
>
> For accuracy and standards reasons, I like to run my page(s) through the
> W3C validator.
>
> This is throwing up an error that I don't follow.
>
> I've used this
>
> *<!DOCTYPE *html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"*>
> *
>
> but when I run it through the validator it tells me that
I tend to put the following before the <HEAD>
-----------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-----------------------------------------------------------------------
Differences:
- firstly, I tend to use strict - it's been a long time since I've needed to use elements from "transitional".
- secondly, I explicitly define a namespace.
It may be the latter that you need to do. I have to confess an empircal knowledge (ie - I know it works, I've no idea why) approach to XHTML :-)
Regards,
Mark
More information about the Sussex
mailing list