Reply
Q? Anyone aware of possible comment attribute inside tags?
Old 05-18-2006, 07:30 PM Q? Anyone aware of possible comment attribute inside tags?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Wireless Audio
Posts: 2,322
Name: Keith Marshall
Location: West Hartford, CT
Hello all:

Does anyone know if there is a way to make comments inside a (x)html tag? I want an eaiser way to keep track of nested elements. I understand that proper indentation will help keep track of opening and closing tags, but sometimes that is hard to achive when you are providing dynamic content (ie php output).

Here is an example of what I mean. Of course, this is only made-up syntax, but to help illustrate what I'm talking about:

HTML Code:
<div id="outer" !#="BO outer container">
   <div id="inner" !#="BO inner container">
      Some content here
   </div !#="EO inner container">
</div !#="EO outer container">
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-18-2006, 07:36 PM Re: Q? Anyone aware of possible comment attribute inside tags?
kIDJOE's Avatar
Extreme Talker

Posts: 180
Location: Hollywood, CA
I dont think you can actually comment within HTML tags, what you can do is add your comments in a tag that you make up your self.

<img src="XXX.gif" alt="XXX" width="XXX" height="XXX" style="XXX" comment="ADD YOUR COMMENT Here" />

It wont validate XHTML but you can add a cooment there and it wont affect your documents.

but I would just go for normal <!--COMMENTS-->
kIDJOE is offline
Reply With Quote
View Public Profile Visit kIDJOE's homepage!
 
Old 05-19-2006, 02:40 AM Re: Q? Anyone aware of possible comment attribute inside tags?
chrishirst's Avatar
Super Moderator

Posts: 13,644
Location: Blackpool. UK
I just put standard HTML comments immediately after the tag.

<div id="main"> <!-- main container " -->

and comment the closing tag with the ID or class

that's what comment tags are there for
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-19-2006, 06:58 AM Re: Q? Anyone aware of possible comment attribute inside tags?
Ultra Talker

Posts: 253
Location: Auckland, New Zealand
You can do it like so:

HTML Code:
<div id="outer" style="/* BO outer container */">blah blah</div>
Not really a clean way, but if you do everything via CSS, then I guess you've got at least a good use for style with comments.


Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
Reply With Quote
View Public Profile Visit mastercomputers's homepage!
 
Old 05-19-2006, 10:30 AM Re: Q? Anyone aware of possible comment attribute inside tags?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
This may be stupid, but why not use the id attribute to name them directly?
Code:
<div id="level_1_outer">
<div id="level_2_inner">
Blah blah blah.
</div>
</div>
That way, you know how deeply an element is nested by its level.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Q? Anyone aware of possible comment attribute inside tags?
 

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13271 seconds with 12 queries