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
Solved

Overhead of div tags

Posted on 2011-09-21
1
231 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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…

808 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