XHTML and the website
Gary W. Swearingen
swear at attbi.com
Sat Apr 5 19:53:59 UTC 2003
Ceri Davies <setantae at submonkey.net> writes:
> I just want to get some consensus before I start making sweeping changes
> to the tree, plus I could do with a bit of input on whether I'm doing this
> The Right Way.
You seem to be talking about a higher-level Right Way than the following,
but I thought I'd mention it for those who don't already know about it.
http://www.w3.org/TR/xhtml1/#guidelines is titled
"HTML Compatibility Guidelines" and it begins with
"This appendix summarizes design guidelines for authors who wish their
XHTML documents to render on existing HTML user agents."
I wrote these notes while reading it about a year ago:
-- use both the encoding attribute specification on the
xml declaration (e.g. <?xml version="1.0" encoding="EUC-JP"?>) and a meta http-equiv
statement (e.g. <meta http-equiv="Content-type" content='text/html;
charset="EUC-JP"' />). The value of the encoding attribute of the xml processing instruction
takes precedence.
-- Always use "&" for "&", esp. in attr. vals.
-- Use <br />, not <br/> and same for other empty elements.
-- Use <p> </p>, not <p /> and same for other usually non-empty elements.
-- Avoid line breaks and wider-than-one-char whitespace in attr. vals.
-- Use both "lang" and xml:lang attr in elements (probably just in head & body (or html)).
-- Use seemingly redundant <a id="foo" name="foo">...</a>
-- Use lower case in tags.
More information about the freebsd-doc
mailing list