Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > naming closing tags: <tr id="taggingtest">&nbsp</tr id="taggingtest">

Reply
Thread Tools

naming closing tags: <tr id="taggingtest">&nbsp</tr id="taggingtest">

 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      02-07-2006

I wonder if the following is a legal thing to do:

<tr id="taggingtest">&nbsp</tr id="taggingtest">

The reason for doing this is that I somehow want to comment which
closing tag should in theory refer to which opening tag, usefull if you
have a large table, and several tables within a table. So it is a sort
of comment I want to add, but then comment inside the closing tag.

 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      02-07-2006
wrote:
> I wonder if the following is a legal thing to do:
>
> <tr id="taggingtest">&nbsp</tr id="taggingtest">


No.

> The reason for doing this is that I somehow want to comment which
> closing tag should in theory refer to which opening tag,


There should never be any doubt. The rules of HTML work in such a way
that a closing tag can only be associated with one opening tag. If
there's any doubt then that must be due to invalid code. (In XHTML
where all closing tags are required it's even more straightforward to
work out which closing tag belongs to which opening tag.)

> usefull if you
> have a large table, and several tables within a table.


There are very few cases where a table of data would contain another
table of data as part of its data. Are you abusing tables for layout
purposes?

> So it is a sort of comment I want to add, but then comment inside the
> closing tag.


Use a comment adjacent to the closing tag. Or adopt a system of
indenting that allows you to line up closing and opening tags and see
at a glance which one ends where. Many decent HTML editors will allow
you to select a whole element by clicking on its opening or closing
tag. So lots of ways to do what you want without making your code
invalid.

If you do want to put attributes in closing tags within your working
environment, make sure that you strip them out as part of your
deployment to your live environment.

Steve

 
Reply With Quote
 
 
 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      02-07-2006
Steve:

>Are you abusing tables for layout purposes?


Yes I am. Much of the HTML sources I see in this job are doing this.
That's bad practise then I presume? Well bad example, and a bad copy I
am afraid.

 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-07-2006

wrote:
> I wonder if the following is a legal thing to do:
>
> <tr id="taggingtest">&nbsp</tr id="taggingtest">


No. Get yourself an editor that can auto-close tags for you.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Closing popup window when closing parent window? =?Utf-8?B?Vk1J?= ASP .Net 3 02-15-2007 08:29 AM
Javax.naming Exception: name not found in naming service. Harman Java 1 07-28-2006 08:51 AM
Closing the doors 15 minutes before closing. doofus Computer Support 12 06-11-2005 08:20 AM
Closing child window WITHOUT closing parent thomas Javascript 0 10-23-2003 04:10 PM



Advertisments