473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Commenting /div tags?

Is there any good, clean, standard way to comment /div tags?
I usually use </div class="container", which works, but
doesn't pass validation.

</div<!-- end of container --also works, except under
certain conditions in certain MSIE versions, where it creates
a gap in the page for some reason.

Is there any formal or informal standard for this? Or is
needing to comment /div tags a sign that my page structure
is too complicated?
Feb 9 '07 #1
4 3398
In our last episode, <12*************@corp.supernews.com>, the lovely and
talented David Winfrey broadcast on comp.infosystems.www.authoring.html:
Is there any good, clean, standard way to comment /div tags?
I usually use </div class="container", which works, but
doesn't pass validation.
Well, yeah. It's nonsense. What in the world would a class
mean for an end tag?
></div<!-- end of container --also works, except under
certain conditions in certain MSIE versions, where it creates
a gap in the page for some reason.
Are you leaving the space between the </divand the comment?
It shouldn't matter, but many versions of IE are broken in this
way.
Is there any formal or informal standard for this? Or is
needing to comment /div tags a sign that my page structure
is too complicated?
--
Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner>
Countdown: 710 days to go.
Feb 9 '07 #2
On 9 Feb, 16:53, David Winfrey <nos...@nospam.patriot.netwrote:
Is there any good, clean, standard way to comment /div tags?
Use an editor that understands block structure.

If you're writing XML, use the editor's auto-format regularly. Get an
editor with formatting rules you can live with.
There is no point in adding "end of element" metadata to an XML
document, because the element is trivially (yet accurately) parseable
to achieve the same result. All that this duplication can possibly do
is give you one more thing to get out of synchronisation.

</div<!-- end of container -->
is _much_ worse than
</div>
if it's actually the end of the nav-bar element, owing to a surplus
tag further up the page.

Feb 9 '07 #3
Thanks for your answers.
Feb 9 '07 #4
In article <11*********************@v45g2000cwv.googlegroups. com>, Andy Dingley writes:
>On 9 Feb, 16:53, David Winfrey <nos...@nospam.patriot.netwrote:
>Is there any good, clean, standard way to comment /div tags?
>There is no point in adding "end of element" metadata to an XML
document, because the element is trivially (yet accurately) parseable
to achieve the same result. All that this duplication can possibly do
is give you one more thing to get out of synchronisation.

</div<!-- end of container -->
is _much_ worse than
</div>
if it's actually the end of the nav-bar element, owing to a surplus
tag further up the page.
However, if one regularly places a comment on each </divtag, stating
what DIV is being ended, then that's not going to happen, since they'll
always be able to see which <divand </divcorrespond.

--
Michael F. Stemper
#include <Standard_Disclaimer>
Indians scattered on dawn's highway bleeding;
Ghosts crowd the young child's fragile eggshell mind.

Feb 9 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jon.george1 | last post by:
Hi, Is it possible to provide documentation for assemblies and namespaces using the inbuilt XML documentation tags in a way that will be understood by NDoc or similar? I have comments for my...
46
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is...
4
by: Ron McNulty | last post by:
Often when testing an app, I want to temporarily comment out sections of the App.config file. Is there any way to do this? Regards Ron
3
by: Naveen Mukkelli | last post by:
Hi All, I'm trying to create XML commenting for my code using XML commenting feature for the first time. I'm using VS.NET 2003 and C#. I'v tried the following way. Step 1: set the file name...
18
by: Marian F. | last post by:
The 12 years old genius function to count english words in a sentence: ' This is my function to count english words in your string ' s is the string with your words to be counted ' Returns an...
8
by: lallous | last post by:
Hello I've been programming for a number of years, however my commenting style is always different. Sometimes I use something like: /************************ * method .... * comments......
2
by: RYoung | last post by:
Can someone point me to a reference concerning source code commenting with VB 2005, ala C# commenting? I googled and found alot of links to add-ins and commercial products, but I can't find any...
2
by: Nathan Sokalski | last post by:
As we all know, the <!-- and --tags in HTML comment out HTML in a *.html file. However, this does not seem to work in ASP.NET *.aspx files. Is there a way to comment out ASP.NET controls that are...
100
by: Angel Tsankov | last post by:
Can someone recommend a good source of C/C++ coding style. Specifically, I am interested in commenting style and in particular how to indent comments and the commented code, rather than when to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.