Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSS & divs or CSS & tables?

Featured Replies

I hear a lot recently that I should change from using css and tables to css and divs. My question is why? I'm a bit of an old Git (50 this year) and really don't know any advantages to using css and divs over css and tables. At the end of the day they both produce the same results and from what I've seen css and divs are no faster at displaying the results. Many corporate companies such as the BBC and IHS still use tables and to be honest, I'm reluctant to change. So what are other member's thoughts?

Howard.

Why limit yourself to divs? There are lots of tags in HTML which can be used to describe pretty much any kind of content. Use them all, and use CSS to style the elements the way you want them.

 

Why should you change? Because tables don't describe the majority of web pages, they describe tabular data. So using tables as a mechanism to lay out your website means that you're not describing your content semantically. You may not notice any difference to page load times, and the end user is likely to be unaware of what tags you're using in your code. But, semantic HTML is good for SEO, and it's good for keeping up to date with the way coding practices are changing.

 

Hope that helps :)

Tables are still great for when you need to show a "table" of data. The problem lies with coders doing the entire page with tables which don't play very nice with certain resizing scenarios and can lead to a lot more code than necessary.

Tables Just Aren't as Accessible

 

Just like search engines, most screen readers for impaired users read Web pages in the order that they are displayed in the HTML source code. If a screen reader were to read a table based layout, it is possible that the customer would hit the back button before the reader had even read through all the navigation.

 

With CSS, you have much finer controls over positioning and you can define a section as belonging on the left side of the page, but place it last in the HTML. Then screen readers and search engines will read the important bits (the content) first and the less important parts (navigation) last.

 

 

 

--------

 

St Albans Web Design

Web Design, SEO, Development, Email Marketing

  • Author

Ok, I've taken on board a lot of what has been said. I do use CSS and mix it with tables. Are there any good books that teach divs? Please bear in mind I'm relatively an old Git (50 this year) compared to most members so I'd rather go with a dummies type book lol. :D

Ok, I've taken on board a lot of what has been said. I do use CSS and mix it with tables. Are there any good books that teach divs? Please bear in mind I'm relatively an old Git (50 this year) compared to most members so I'd rather go with a dummies type book lol. :D

Ok I'm being pedantic here, but I think it's worth repeating: CSS layouts do not rely solely on divs. There are lots of block level elements, and using css you can make any layout. Have a look at the sitepoint books - they're really well written and presented.

The best book I've found is CSS The Missing Manual, it's not specifically about Divs but does conatin a lot of info about that style of design, if you're using Dreamweaver then the missing manual for that is good too.

 

Ste

The best book I've found is CSS The Missing Manual

 

Second this. PS I'm an old git too.

I hear a lot recently that I should change from using css and tables to css and divs. My question is why? I'm a bit of an old Git (50 this year) and really don't know any advantages to using css and divs over css and tables. At the end of the day they both produce the same results and from what I've seen css and divs are no faster at displaying the results. Many corporate companies such as the BBC and IHS still use tables and to be honest, I'm reluctant to change. So what are other member's thoughts?

Howard.

 

i now use CSS and Divs, the only time i use a table, is when i make a form, so the text and form elements are laid out nicely. Since i have used CSS and Divs, i have felt more confident in myself, and yes....i have given up dreamweaver and started coding

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.