DIV tags VS Tables

Me, I love tables. It is what I was taught first and makes more sense to me.

But now I am starting to get div tages.

With me wanting my site to be theme aware, and possibly using what is called a 'persitant', I can have someone come to the site select a theme and surf, come back later and the theme is still there (unless they closed out all browser windows and the persitamce is removed from memory).

and with cascading style sheets, I can cnahge all the sub-themes of my site and make it very easy for me to wrote articles. All I have to do is put the text in the proper area. Once I learn how to connect asp/php to the database, I can create my own app on my computer with VB and Access to make the webpage for me and upload it to the database on-line... I think...


But I still like tables. To me they are more straught forward. Picture the cell in your mind and your most of the way there. Organize your code structure so you will not get lost and your good to go.

then again, you could do that with div tags...

So which is better? Some say DIV tags are faster on load but I have not seen a difference.
2,254 views 6 replies
Reply #1 Top
each has their own use but I would never try and create a heavy tabular layout using divs, it'd be a nightmare!! You can do some really cool stuff with DIV's and CSS absolute positioning but really a DIV is just a general container that can hold stuff. A table is VERY specific in it's purpose, to display tabular data, and I don't think DIV's are intended to be a replacement for tables. Sure, if you so desired you *could* replace tables with DIV's but I'm not sure why you would want to..

So, I guess my answer is both!

BTW, PHP is a breeze to connect to a DB, use it as most providers don't offer ASP as a scripting language.
Reply #2 Top
Div's make cleaner html and messier stylesheets. But sadly, as long as browsers like IE and Safari don't understand basic CSS like min-height, tables will be needed.
Reply #3 Top
ok guys. thanks for the insight.

I wondered a little about having too many DIV tags. Tables just seems more natural to me, but I figured its because it was what I was taught first.

and for me, connecting php to the database is hard for me to grasp. I'm not getting something.
Reply #4 Top
I was like you joetheblow, I learnt tables when I taught myself HTML back when frames were the height of technology and css was the figment of someones imagination. Tables was still being taught as a base structural element when I completed my multimedia course in 2001. Divs seemed confusing and vague at that time so I sort of ignored them. I've never clicked with DIV tags, I know they can do more than I think they can, but like you Joe, Tables are so specific, precise and straightforward. I still use tables in webdesign over DIVs.



Powered by SkinBrowser!
Reply #5 Top
I'm learning it, but with complex layouts I rather stick with tables. I'll admit DIV tags are pretty cool and simplifies, to a degre, the web page.



Powered by SkinBrowser!
Reply #6 Top
div tags are much better they are much more conformant with CSS and HTML interoperability when passed through a W3C checker. I started learning with tables, and recently made the switch to DIV and Layers, it all depends on your software to be honest. Dreamweaver handles them perfectly, whereas Frontpage and other cheaper alternatives seem to mess them around. If I had to choose I would stick with DIV, but I agreaa that tables are easier to use initially.