W3C complience checker and conformance

T

Toby Inkster

ironcorona said:
So THAT'S what that's about. I've just noticed recently that the W3
validator is insisting on a character encoding declaration. Something like:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
in order for it to be strict XHTML.

A character encoding most be declared for the validator, but you don't
need to use a META element to do so.
 
S

Spartanicus

Mark Parnell said:
So would you care to show some sort of reference as to why it is
"incorrect XHTML" to use a closing tag on an empty element, since the
part of the specs I quoted says that it *is* correct?

I shouldn't have suggested that it was a spec compliance issue. Although
there isn't even a "SHOULD NOT" recommendation in the spec, and the
informative note you quoted even suggests the opposite, I consider using
a closing tag for empty elements poor practice, on par with quick
closing non empty elements, which IIRC is expressed as a "SHOULD NOT" in
the spec.
 
A

Alan J. Flavell

Perhaps. It's quite new to me so when I didn't have one I followed
the link it showed:
http://validator.w3.org/docs/help.html#faq-charset

Indeed:

| Specifying a character encoding is normally done in the web server
| configuration file [...]
I followed this about and it suggested the meta tag.

I'm not sure how you managed to read that into it!

meta http-equiv is *only* relevant to HTML (and consequently to
Appendix-C XHTML/1.0 being offered as text/html, since that is meant
to be handled as error-fuxup-ed HTML).

It has no meaning for XHTML-properly-so-called.

It's a workaround which can be used (for HTML, not XHTML) for
protocols (such as file: or ftp:) which do not include a mechanism for
carrying a character encoding specification (MIME charset) in the
protocol. But for HTTP, the better place to deal with this is in the
HTTP header, just as the W3C FAQ says - by suitably configuring the
server.

The cited WDG tutorial (which is primarily addressing HTML, not XHTML)
says the same:

|An HTML document must specify its character encoding. The preferred
|method of indicating the encoding is by using the charset parameter
|of the Content-Type HTTP header.
 
M

Mark Parnell

Deciding to do something for the good of humanity, Spartanicus
I shouldn't have suggested that it was a spec compliance issue. Although
there isn't even a "SHOULD NOT" recommendation in the spec, and the
informative note you quoted even suggests the opposite, I consider using
a closing tag for empty elements poor practice, on par with quick
closing non empty elements, which IIRC is expressed as a "SHOULD NOT" in
the spec.

Ah, we agree then. It is certainly bad practice. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top