Pioneer Skin
Login  ::  Register
Saturday, May 19, 2012
 
- - - - - - - - Sponsorship Advertisement Area - - - - Thank you to our Sponsors - - - - - - - - -
New Horizons Computer Learning Centers
WGD Discussion Forum
SearchForum Home
     
  Web Design  General Web Design Discussion  The div tag...
 The div tag
 
 4/5/2007 7:23:45 PM
therustycook
15 posts


The div tag

In the presentation in tonights meeting they were talking about the div tag.  I have seen this tag referenced before in other listings.  I am wondering what the real benefit of the tag is and how it affects the web page?

 

 4/5/2007 7:27:07 PM
MichaelMouse
1 posts


Re: The div tag
The div tag is used to divide up the page.  Each div tag can act as if it were a level or independent "page" on a page.  With CSS or CSS-P this can place that division at a position on the page independent of resolution (using float and clear).  With regular CSS, that Div can have different CSS than other division of the page....for instance links and visited links in this div and look and act differently than links in another div on the same page.
 4/5/2007 11:03:07 PM
terrydavidson
10 posts
www.terrydavidson.com


Re: The div tag

Here's a little more for reference. In a page design using tables for design layout you will not see many div tags except for alignment. In a tabless design div tags are used to position the formating as well as the tabular data. Tabless websites rely on CSS (stylesheets) for their entire layout and the formating of content. The stylesheet will contain classes for various parameters and then those classes are assigned throughout the site for the design and content.

One thing I have found tricky with div tags is using them for positioning. There is some extra attention spent in your stylesheet for positioning of elements based on their relative or absolute position.

Good thread subject. We need to get Magic Marc's  take on div tags.


Terry Davidson
WGD Forum
 4/6/2007 1:49:00 PM
magikmarc
40 posts
www.netmagikpros.com


Re: The div tag

TheRustyCook,

First, MichaelMouse and TerryDavidson could not answer your question about the div tag any better than I. I think that their answers are great, and very accurate.

 

My answer to your question about the benefits of using the div tag, is this:

  1. Less code in the actual web page if you use the div tag instead of tables. An example of this would be <div>text</div> instead of <table><tr><td>text</td></tr></table>. Basically, without any formatting in the page or with CSS, these two things do the same basic thing, and the result is the same on the page. If you combine many of these codes in one page (a lot of div tags versus a lot of tables) the tabled page will load slightly slower because of the “extra” code that the table needs. In the search engines, based on the same exact text for each, the tabled page won’t (generally) rank as high because the keywords will have more code to compete with which means less keyword density on the page.
  2. Because of more code being in the tabled web page it will use slightly more bandwidth, and if you have a lot of visitors, this could cost you more money with your server space

Don’t get me wrong, if you have tabular data to present on the web page, then a table is the way to go (presenting data from an excel document for example). This would be a lot more difficult to do with just div tags (although it could be done).

 

Now if you throw CSS into the mix (with or without tables) it get’s a lot more complicated to set up, but it will be a lot easier to update when changes are needed to the design of pages site wide.

 

Bottom line, CSS and tableless web design are not needed to make a web page, but the advantages of them far outweigh the disadvantages.


MagikMarc
WDG Forum Webmaster
Net Magik Pros Web Design
  Web Design  General Web Design Discussion  The div tag...
Copyright 2007-2008 by WGD Forum :: Designed by ZapWebDesign.com