W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: Why HTML should be taught as HTML without pretending it is XML

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Sat, 21 Jul 2007 15:11:54 -0400
Message-ID: <6b9c91b20707211211me28ca3emca3bad46f9cc4068@mail.gmail.com>
To: "Ben Boyle" <benjamins.boyle@gmail.com>
Cc: "Henri Sivonen" <hsivonen@iki.fi>, "public-html@w3.org WG" <public-html@w3.org>

On 7/17/07, Ben Boyle <benjamins.boyle@gmail.com> wrote:
> I'm more interested in being able to teach people a particular syntax
> style of HTML like:
> <ul>
>   <li>item here</li>
>   <li>item here</li>
> </ul>
>
> As opposed to:
> <UL>
>   <LI>item here
>   <LI>item here
> </UL>

Consider the following also:

<!DOCTYPE html>
<html>
    <head>
        <title>title</title>
    </head>
    <body>
        <ul>
            <li>item here</li>
            <li>item here</li>
        </ul>
        <ul>
            <li>item here<li>item here</ul>
    </body>
</html>

Say if I want each LI's content to be exactly "item here".  By closing
the LIs, I can easily do this (parsing bugs aside).

If I just let the parser close the LIs, they might end up with comment
nodes and white-space etc. (or whatever else is lurking) in their
content unless I squish them together.

If the latter should be taught, it should be made clear to the student
where the content  of the element begins and ends. With the former,
it's easy as the content is inside something instead of being after
something and before something.

-- 
Michael
Received on Saturday, 21 July 2007 19:11:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT