Identifying end tags

Hi there

Working with nested tables, div tags and other elements may cause problems
when combining code and especially when there will be different levels of
nesting. It's not always easy to keep track of how many div's to end at the
end of the local code and there is a potential risk of making problems for
the framing code. Because of this I would like to know if there is or could
be made an attribute used by programmers to keep track of the tags. The
easiest part would be to use the id/class attribute also at ending the tag,
but I am not sure whether this would confuse some browsers.
I have used comments but they have a tendency to separate from the tag  
after
a while, and having too many comments after each other also seems to make
problems for some browsers.

An example (not indented to make a small example illustrate the confusion
more visible. Besides indenting rarely works so well it should be used as  
an
indicator of relations.)

<div id="design">
<div id="content">
<div id="maincontent">
<div id="related">
             Content
</div>
</div>
</div>
</div>


With comments
<div id="design">
<div id="content">
<div id="maincontent">
<div id="related">
             Content
</div><!--/related-->
</div><!--/maincontent-->
</div><!--/content-->
</div><!--/design-->

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">

Even though using id/class would be the best, making it easy to identify
both id's and classes with potentially identical names, I guess it may be
confusing for both browser and programmers. One solution would be to add e
for ending to the attribute. Then it should be a new attribute that
hopefully doesn't trigger any action in any browser, and it also helps
programmers to see that it is an end-tag and not a new div of the same ID.

<div id="design">
<div id="content">
<div id="maincontent">
<div class="related">
             Content
</div eclass="related">
</div eid="maincontent">
</div eid="content">
</div eid="design">

These are just some random thoughts from someone trying to make neat and
readable code. I believe you have the knowledge both to understand my
problems and to find the best way to solve this.

I would appreciate an answer to this, even if you won't do anything about
it, just to know that the problem has been considered.

Best regards
Nickolas Nansen

_________________________________________________________________
MSN Spaces http://spaces.msn.com/?mkt=nb-no Vis hvem du er og hva du vil

Received on Friday, 23 June 2006 07:37:23 UTC