Solved

Overhead of div tags

Posted on 2011-09-21
1
221 Views
Last Modified: 2012-05-12
I have recently started a new job and find that the code that I am supporting has an overabundance of superfluous <div> tags.  The attached code is scrubbed and provided only to give an example of the overuse of the tags.  To me it makes the code hard to read and maintain.  My question, however, is what sort of overhead if any this adds to the performance.  Is there any sort of a hit with these tags?

Thanks.
<div id="ctl00_x1">
 <span id="ctl00_x2"></span>
  <div id="ctl00_x3" >
   <div style="width: auto; margin: auto;">
    <div>       
     <div id="ctl00_x4" style="width:60px;">
      <img ...
      <span id="ctl00_x5" style="font-size:XX-Small;">Hide</span>
     </div>
     <div id="ctl00_x6" style="width: 150px;">
      <div id="ctl00_x7" style="text-align: center; background-color: #5377A9; color:white; width:145px; font-weight:bold;" class="Left">
       Test Cell<br />Settings
       <div id="ctl00_x8">
        <table id="LeftTable" cellpadding="0" ...
       </div>
      </div>
     </div>
     <div id="ctl00_x9" style="width:60px;">
      <img ... 
      <span id="ctl00_x10" style="font-size:XX-Small;">Hide</span>
     </div>
     <div id="ctl00_x11" style="width: 150px;">
      <div id="ctl00_x12" style="text-align: center; background-color: #5377A9; color:white; width:145px; font-weight:bold;" class="Left">
        Test<br />Settings
       <div id="ctl00_x13">
        <table ...>
       </div>
      </div>
     </div>
    </div>
    <br />        
   </div>  
  </div> 
 </div>

Open in new window

0
Comment
Question by:TimAttaway
1 Comment
 
LVL 3

Accepted Solution

by:
woepwobin earned 250 total points
Comment Utility
I wouldn't expect any measurable difference with, say, half the number of <div> tags.

But of course if you van reach the same design-goal with less <div> tags that would help maintainability.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now