Jump to content

[SOLVED] Tables, Div's or Both?


pkirsch

Recommended Posts

Hello Everybody!

 

I am wondering which i should Use! Tables, Div's or both? I am trying to follow the W3 Web Standards, and I don't know which are better?

 

I have a friend that said div's load faster!? Div's  are harder to use because you cant position them the same!

 

Please let me know what You think!

 

Thanks. Have a great day,

pkirsch

:)

Link to comment
https://forums.phpfreaks.com/topic/49897-solved-tables-divs-or-both/
Share on other sites

If you use a decent doc type declaration then you can place divs exactly where you want.

 

But the answer to your question is both. Use divs to group sections of your page - use tables to display tabular data (and nothing else!) and use css to layout your page as you wish.

 

In actual fact it is far more complicated to manage a page tat uses tables for layout. When it comes to modifying you need to ensure you manage any colspans or rowspans properly AND you need much more markup for a table than a div (it requires at least 3 tags and their associated tags for just one cell - a div is just one open and closing tag.)

 

Pages that have a css layout will (in virtually every case) load faster than its table counter-part.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.