473,386 Members | 1,745 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,386 software developers and data experts.

how to label matching div elements

Hi,

How should I label matching div tags in a long piece of code? Useful when trying to find a coding error.

I can do this

Expand|Select|Wrap|Line Numbers
  1. <div id="level1">
  2.   <div id="level2">
  3.   </div>
  4. </div>
  5.  
I don't know how to label the closing </div> tags.

In wordpress php I do this

Expand|Select|Wrap|Line Numbers
  1. <div id="level1">
  2.   <div id="level2">
  3.   </div>
  4. </div> <?php /*level1*/ ?>
  5.  
which looks very cumbersome.
Feb 7 '12 #1
3 2050
drhowarddrfine
7,435 Expert 4TB
You mean the end tag? You can't except with comments.
Feb 7 '12 #2
ok, thanks very much!
Feb 7 '12 #3
<div class="header">
<div class="logo">
</div>

<div class="site_title">
</div>

<div class="menu">

</div>
</div>

<div class="content">
<div class="left_content">

</div>

<div class="right_content">

</div>
</div>
<div class="footer">

</div>

this way you can identify all the main div as well as it's easy to find out the error .....

Bharat Parmar(Bharat383)
Apr 16 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: flupke | last post by:
Hi, i'm having trouble with deleting elements from a list in a for loop ============== test program ============== el = print "**** Start ****" print "List = %s " % el index = 0 for line...
8
by: Hugh Sparks | last post by:
When processing an xml document that contains elements such as: <element xmlns="goop"/> ... <element xmlns="gleep"/> I want to create two xsl stylesheet templates: one that matches the...
4
by: WindAndWaves | last post by:
Hi Gurus I have the following statement in my code: var e = form.elements; Is it possible to put any conditions on this statement. What I actually want to say is: var e = form.elements...
4
by: Logico | last post by:
Hi everybody, I need to do a function in javascript to check or uncheck all checkboxes with the same id. I want this function to work in every form and every page of my site, as I will use the same...
3
by: daniel.neilson | last post by:
I have two one-dimensional Numeric arrays, and I need to know the indices in the second array of elements from the first. so if i had: a=array() b=array() i want a function match that does...
11
by: solandre | last post by:
hi there, i have to find matches in two sorted arrays. there are two good possibilities as a temporary solution, performing different, depending on the inner structure of the data. but i try to...
15
by: bcochofel | last post by:
Hi, I want to use a variable to sort elements. That var his passed with query string (I'm using Perl CGI to generate XML). Here's a sample of my output:...
2
by: =?iso-8859-1?q?Jean-S=E9bastien?= | last post by:
Hello, I'm using yahoo css template and designing application with ROR. I'd like to access the elements with no explicit id (starred lines), and i must not add some explicit id. ...
10
by: Janis Papanagnou | last post by:
The task seems simple but I am not sure whether this is possible or even the right way to look at it... I have <td class="X"elements where "X" is a placeholder for class names "A", "B", etc. ...
5
by: Ouray Viney | last post by:
Hi All: I am looking at writing a python script that will let me parse a TestSuite xml file that contains n number of TestCases. My goal is to be able to count the <TestCaseelements base on a...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.