W3C home > Mailing lists > Public > www-html@w3.org > July 2006

Re: Identifying end tags

From: Nickolas Nansen <nick_nansen@hotmail.com>
Date: Mon, 03 Jul 2006 13:33:09 +0200
To: P.Taylor@rhul.ac.uk
Cc: www-html@w3.org
Message-ID: <BAY19-F220FFC862096D3DB6A542F86700@phx.gbl>

Hi there

Thank you all for your comments on my views.

Maybe I should give you a bit more information on my background to make you
understand why I don't think using other applications or better  
will solve all the problems.
I work in a big company where the sites are handled by several programmers,
all depending on what part of the code you work on.

Some programmers handle design. They handle what I call the frame code, the
code that starts at the beginning of the html document and ends at the
bottom. Typically this is code for layout, columns, colors and basic  

Other programmers handle spesific code, like content inside this design.
Some look up data in a database and wants to present this in the web page.

All this is handled by huge web-servers that collects the relevant piece of
code from different places and builds a html document to the client. Some
pieces of code are used several places, others only a few. A standard
starting code of a block may in some cases have several potential
counterparts in ending the code, depending on the design. I have had cases
where several pieces from several programmers had to be a part of the same
table to make everything positioned correctly.

In this setting you don't always see the entire code. You have your local
piece, and try your best to keep that in perfect shape. They may work on a
piece that has already been nested two or three times.  Different
programmers have different applications to work with, and they may handle
indentation differently. Besides, not all programmers are perfect in
indentation. Because of this I find indentation not always a reliable  
of determining nesting levels.

In modern html programming div tags are used frequently, and one may
therefore get several levels. Take a look at the source of a fairly simple
page like http://www.csszengarden.com/

I have several times found myself in the position of trying to piece
together where the error is in the end of a long html document produced by
our servers. There may be several pieces of code in this, and the
indentation is a mess. One situation like this was the reason for my  
this time.

I will try to write another example to illustrate the complexity in my

                              <!--file1 : made by designer -->
<div id="container">
<div id="maincontent">
                              <!-- file2 : made by content management
programmer -->
        <div id="maintext">
           <div id="notebox">
                              <!-- file3 : made by spesific programmer -->
     <div id="personalinfo">
     <div id="subscriptioninfo">
                               <!-- end file3 back to file2 -->
                              <!-- end file2 back to file1 or in some cases  
special end code in file4 -->


I hope you see that I am not asking for this because I am lazy and don't
want to fix this in ways already possible, but because I think the html  
could benefit from this feature and make it more maintainable in more
complex settings. It would make the local code easier to read without  
to calculate the entire document from start to finish.

Take an example from http://www.w3.org/
It is not easy to know what the two </div> does without counting the divs
earlier in the code. And if there is no indetation on World Wide Web
Consortium code, I would say the possibility to find lack of indentation
elsewhere is worth considering.

Read about the <a href="/2006/rwc/" shape="rect">Rich
Web Clients Activity</a>. <span class="archive">(<a rel="details"
title="Working Draft: XML Binding Language (XBL) 2.0"
href="/News/2006#item111" shape="rect">News archive</a>)</span></p>

<h3 class="pastNews"><a href="/News/2006" shape="rect">Past News</a></h3>

I don't know what will work out in a bigger picture, I believe you guys are
the best to consider that. All I am trying to say is that html is not  
written by one guy with total control and by best practice. Sometimes it  
end up as a mess written by a lot of different programmers and handled like
a small piece of a bigger puzzle. I believe my suggestions would be helpful
in those cases.

Best regards
Nickolas Nansen

> From: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>
> To: Nickolas Nansen <nick_nansen@hotmail.com>
> CC: www-html@w3.org
> Subject: Re: Identifying end tags
> Date: Sat, 24 Jun 2006 09:49:35 +0100
> I agree with most of Nickolas's points, although
> > It's not always easy to keep track of how many div's to end at the
>> end of the local code
> seems odd to one who always ends his tags as soon as
> he starts them (that is, I write <div></div> and then
> re-position the cursor rather than writing <div> and
> then relying on memory).  I also find
> > Besides indenting rarely works so well it should be used
>> as an indicator of relations.
> rather odd : if only Dreamweaver would leave my indentation
> alone (/particularly/ when using Library elements and
> templates), I would find indentation normally sufficient,
> except where the open and close tags are so far apart
> vertically that their alignment cannot be visually
> compared.
> However, I do strongly support the suggestion of
> allowing attributes on end tags :
>> With attributes
>> <div id="design">
>> <div id="content">
>> <div id="maincontent">
>> <div id="related">
>>             Content
>> </div id="related">
>> </div id="maincontent">
>> </div id="content">
>> </div id="design">
> and although I hear (and have heard many times before) the
> counter-argument (HTML is XHTML is XML, and XML doesn't
> allow attributes there), I do continue to wonder if carrying
> all the baggage of XML is really worth the effort : are there
> as yet /any/ browsers that use a real XML parser to handle
> XHTML, any more than there are browsers that use a real SGML
> parser to handle HTML ?  I often feel that we are in grave
> danger of throwing out the baby with the bathwater by blindly
> adopting as our masters standards that in reality have little
> if any influence on what really happens in the browser ...
> Philip Taylor

Trangt om plassen? http://www.hotmail.com MSN Hotmail gir deg 250MB gratis
Received on Monday, 3 July 2006 12:37:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:13 UTC