Re: EN and FR

Pierre Crescenzo <Pierre.Crescenzo@anima.net> wrote:

> I've validate a page [1] in HTML 4.0 strict. When I use :
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
> 	"http://www.w3.org/TR/REC-html40/strict.dtd">
> 
> that's OK. But if I change EN to FR (the page is in French), the
> validator prints "Level of HTML: ." and not "Level of HTML: HTML 4.0"
> and can't give an icon for this type. Is this normal ?

Take a look at "7.2 HTML version information" in HTML 4.0
Specification [2].  It states:

    [...] The last two letters of the declaration indicate the language
    of the DTD. For HTML, this is always English ("EN").

So you can't change the declaration even if your document is written
in French.  To specify the language of the document, HTML has "lang"
attribute [3].  For French documents, you can use it something like
this:

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
      "http://www.w3.org/TR/REC-html40/strict.dtd">
  <html lang="fr">
    ...

> [1] http://www.anima.net/

[2] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.2
[3] http://www.w3.org/TR/REC-html40/struct/dirlang.html#h-8.1

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Tuesday, 27 July 1999 13:02:04 UTC