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?
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.
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:
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.