Solved

Overhead of div tags

Posted on 2011-09-21
1
240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
woepwobin earned 250 total points
ID: 36575834
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

627 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