Re: [W3C docs] We should teach by example.

On 7/6/07, Philip TAYLOR <Philip-and-LeKhanh@royal-tunbridge-wells.org>
wrote:

> Michael A. Puls II wrote:
> >
> > 1. I don't see any explicit closings for P, LI, BODY,  HTML and some
> DDs.
>         Bad


Why?

> 2. I don't see attributes being quoted.
>         Some are, but those that aren't : bad


Why?

> 3. I see the HTML4.01 doctype being used without the dtd URI.
>         Debatable


Why?

Since the advent of XHTML there has been confusion among authors that their
HTML must now look like XML, while they continue to serve it as text/html.

You would be surprised how many authors are not aware that:
- many end tags are optional, including </body> and </html>  (I have
personally seen a server-side include called footer.inc that did nothing but
spit out </body></html>), as well as many other end tag
- some start tags are optional, including <html>, <head>, <body>, and
<tbody>
- some elements exist in the DOM even if their start tags are omitted, the
canonical example being <tbody>, where authors expect a <tr> to be the
.firstChild of a <table>, or "table > tr" to match something in CSS (I'm
sure there's a browser that does...)
- attributes without spaces don't require quotes
- DOCTYPE is almost completely useless.  I have been in online and
face-to-face conversations where authors think that DOCTYPE will actually DO
something in a browser other than change the rendering mode from quirks mode
to standards mode

I can agree that the source should be human-readable - proper tabbing and
line breaks.  However, if the specification of that defines HTML's syntax -
optional tags, quoting, and all - actually uses some of that optional syntax
in its source, that is a Good Thing.  It serves as an example of what valid
HTML MAY look like.

> 4. I see Anne's email address in the href where the @ is not
> > properly-encoded to %40 in the mailto URI.
>         Are you certain that it is a reserved character in HTML ?


@ shouldn't be encoded when it is separating the user and domain portion of
the URI.  It should be encoded elsewhere (which is why my FTP login on a
certain server is ftp://username%40example.com@example.com)

Received on Friday, 6 July 2007 20:21:53 UTC