Re: Optional tags

I didn't claim that you would see that code anywhere, just that it has a
different meaning than the other code (the difference being a whitespace
due to the newline before the omitted closing tag.)

As was previously mentioned by another participant, this could be a
meaningful difference when it comes to JavaScript developers working at the
DOM level.  So, all I was saying is that if the difference is meaningful in
the situation, then do include the end tags so you are specifying the
intention rather than leaving it ambiguous.

The other example you gave with the shortest possible doc does not suffer
from any similar ambiguity.  It is clearly a document with a space for a
title and an empty body.  I like it (not that whether or not I like it is
relevant.)

~Jeff


On Mon, Jan 27, 2014 at 9:52 AM, Jens O. Meiert <jens@meiert.com> wrote:

> > Therefore translates to:
> >
> > <ul>
> > <li><p>This</p><p>That
> > </p></li><li><p>Another
> > </p></li></ul>
> >
> > Which is ugly code, in my opinion.
>
> Where would you see this code, if it just demonstrates where a
> *parser* puts in omitted tags?
>
> I’m wonderfully indifferent about getting into a debate here, so,
> anyone who claims that
>
> <!doctype html>
> <title> </title>
>
> (which is the shortest valid doc) is MORE complicated than
>
> <!doctype html>
> <html>
>   <head>
>     <title> </title>
>   </head>
>   <body>
>   </body>
> </html>
>
> is either blind or in serious denial.
>
> I’ve traditionally been very accepting of other developers or my teams
> preferring to not omit tags, and, honoring personal preferences, also
> don’t suggest everyone omit them, but it’s bullshit to say omitting
> them results in more complicated code, or is less easy to write.
> Complete bollocks.
>
> --
> Jens O. Meiert
> http://meiert.com/en/
>

Received on Tuesday, 28 January 2014 06:32:56 UTC