• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 15:47
CEST 21:47
KST 04:47
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Voting2[ASL20] Ro4 Preview: Descent6Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Weekly Cups (Oct 6-12): Four star herO65.0.15 Patch Balance Hotfix (2025-10-8)67Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition325.0.15 Balance Patch Notes (Live version)119
StarCraft 2
General
Weekly Cups (Oct 6-12): Four star herO PartinG joins SteamerZone, returns to SC2 competition 5.0.15 Patch Balance Hotfix (2025-10-8) IP For new Brazil servers for NA Players TL.net Map Contest #21 - Finalists
Tourneys
WardiTV Mondays SC2's Safe House 2 - October 18 & 19 Sparkling Tuna Cup - Weekly Open Tournament RSL Offline Finals Dates + Ticket Sales! SC4ALL $6,000 Open LAN in Philadelphia
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
BW General Discussion [ASL20] Ro4 Preview: Descent I'm making videos again Any rep analyzer that shows resources situation? Whose hotkey signature is this?
Tourneys
[ASL20] Semifinal A [ASL20] Semifinal B [Megathread] Daily Proleagues [ASL20] Ro8 Day 4
Strategy
Current Meta BW - ajfirecracker Strategy & Training Siegecraft - a new perspective TvZ Theorycraft - Improving on State of the Art
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread ZeroSpace Megathread Dawn of War IV Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread The Games Industry And ATVI Stop the Construction YouTube Thread
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Inbreeding: Why Do We Do It…
Peanutsc
From Tilt to Ragequit:The Ps…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1279 users

HTML/CSS Tables vs Divs

Forum Index > Tech Support
Post a Reply
1 2 Next All
Aelfric
Profile Blog Joined March 2010
Turkey1496 Posts
Last Edited: 2012-04-30 15:40:04
April 30 2012 12:43 GMT
#1
Hey guys, i am learning html and designing basic websites and stuff. What i found out via using firebug is most websites use tables for design instead of divs. I always liked to work with divs.

Why do people prefer tables over divs? I always find divs to be more easy. Most documents i found in the internet says divs are more accurate for design. So what i wanted to ask is if you design with tables what are the logical reasons behind it instead of "i am just used to work with it" ?

Poll: Which one is better overall?

Divs + CSS (38)
 
90%

Tables (4)
 
10%

42 total votes

Your vote: Which one is better overall?

(Vote): Tables
(Vote): Divs + CSS



Here is a nice article about this:
http://coding.smashingmagazine.com/2009/04/08/from-table-hell-to-div-hell/
Tomorrow never comes until its too late...
Josh_rakoons
Profile Joined December 2011
United Kingdom1158 Posts
Last Edited: 2012-04-30 12:48:41
April 30 2012 12:45 GMT
#2
My guess is that they're easier to use for new designers.
IAMFAPMAN
Profile Joined March 2012
60 Posts
April 30 2012 13:00 GMT
#3
divs > tables imo
Aelfric
Profile Blog Joined March 2010
Turkey1496 Posts
April 30 2012 13:01 GMT
#4
On April 30 2012 22:00 IAMFAPMAN wrote:
divs > tables imo

Yeah but i ask why do you think that way.
Tomorrow never comes until its too late...
IAMFAPMAN
Profile Joined March 2012
60 Posts
April 30 2012 13:06 GMT
#5
i think the code is alot easier to read.. never used alot of tables tho

.. and im doing this in my freetime so i learnt everything from the internet or books.
peol
Profile Joined August 2011
Sweden2 Posts
April 30 2012 13:24 GMT
#6
Tables are a 90's/early 2000 phenomenon. Last several years it has been known and enforced to write semantic mark-up. Tables are to be used for tabular data, not for layout purposes. I do however think that they may serve a purpose in specific cases (like forms etc.) but generally, seeing tables used for layout is indicating that the developer may not have known what they're doing.

So, use <div>, <section>, <article>, <header>, <footer> etc. (all valid in HTML5, which is widely adopted in any modern web browser) to avoid divitis.
a176
Profile Blog Joined August 2009
Canada6688 Posts
April 30 2012 15:01 GMT
#7
On April 30 2012 22:01 Aelfric wrote:
Show nested quote +
On April 30 2012 22:00 IAMFAPMAN wrote:
divs > tables imo

Yeah but i ask why do you think that way.


you dont really need to use tables for overall formatting of webpages anymore. divs + stylesheets offers you a bit more freedom in placement of your content, and its overall much cleaner in the code. save tables for truly tabulated data.
starleague forever
Alvin853
Profile Joined December 2011
Germany149 Posts
April 30 2012 15:04 GMT
#8
From my experience positioning elements with divs tends to be more browser-dependent than using tables. Different browsers or resolutions can cause divs to look different than you want them to, so most websites use tables for the basic layout, and divs for anything that goes on top of that.
Both have their advantages, but I usually prefer tables for anything i need to place at an exact position, for example a table column is much easier to center on a page by adding blind columns left and right, than a div; and I use divs, when I want to place something dynamically like hover-boxes, dropdown menus or anything I don't know right away where to put it.
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
April 30 2012 15:08 GMT
#9
Divs are just easier and faster way of working in the development world. They're also a lot cleaner since you use the CSS to style everything.
Life?
Zerste
Profile Joined September 2010
United States112 Posts
April 30 2012 15:21 GMT
#10
Tables were used before CSS really developed/took off. If you're still using them for anything but tabular data your code is likely invalid. Use the w3c validation services to be sure you're coding up to standards.

http://validator.w3.org/
Fateless
Profile Joined January 2011
United States99 Posts
April 30 2012 15:27 GMT
#11
This is a silly question, and an apples to oranges comparison to be honest. A lot of you are showing your lack of experience through your answers. Also, it makes me laugh that you say you are just learning but that "You always liked divs" What, so you've been doing this for a month and you've already got an established preference?

Tables are not a "90's phenomenon" I would challenge you to find a major modernized website that doesn't contain at least one table, Google, TeamLiquid, and Amazon.com all use at least one table somewhere on their pages. To be a competent developer you need to understand both and learn to apply them seamlessly.

I think you've got the right idea dissecting pages with Firebug but I feel like you're searching for some absolute technique that doesn't exist. Just keep practising and eventually you're going to get a feel for how things should be put together.

TL;DR, There is no hard and fast rule that says when you should use a table or a Div, you're just going to have to gain some experience to learn when to use which.
teknotrance
Profile Joined March 2012
61 Posts
April 30 2012 15:34 GMT
#12
where is the article?
Aelfric
Profile Blog Joined March 2010
Turkey1496 Posts
April 30 2012 15:40 GMT
#13
On May 01 2012 00:34 teknotrance wrote:
where is the article?

http://coding.smashingmagazine.com/2009/04/08/from-table-hell-to-div-hell/
Tomorrow never comes until its too late...
Aelfric
Profile Blog Joined March 2010
Turkey1496 Posts
April 30 2012 15:41 GMT
#14
On May 01 2012 00:27 Fateless wrote:
This is a silly question, and an apples to oranges comparison to be honest. A lot of you are showing your lack of experience through your answers. Also, it makes me laugh that you say you are just learning but that "You always liked divs" What, so you've been doing this for a month and you've already got an established preference?

Yes, so far i liked divs more.
Tomorrow never comes until its too late...
Deleted User 135096
Profile Blog Joined December 2010
3624 Posts
April 30 2012 16:17 GMT
#15
As a good design practice, tables should not be used to define structural elements that are not tabular in nature, simple as that. There are a whole host of really good reasons why, the main two being that A. using tables creates a larger html footprint and therefore cause larger document sizes and slower load times (and becomes very expensive if your site gets a lot of traffic, like Google), and B. thanks to html + CSS we have a way to be more flexible with how we structure our layout.

I don't think anyone who's a designer is saying that tables shouldn't be used, we're saying tables should be used for what they were intended to do, present tabular data.
Administrator
Chargelot
Profile Blog Joined December 2010
2275 Posts
Last Edited: 2012-04-30 17:13:09
April 30 2012 17:11 GMT
#16
Is it wrong to put your tables inside of divs?
^new to CSS/HTML, genuine question.
if (post == "stupid") { document.getElementById('post').style.display = 'none'; }
Fateless
Profile Joined January 2011
United States99 Posts
Last Edited: 2012-04-30 17:59:50
April 30 2012 17:53 GMT
#17
On May 01 2012 00:41 Aelfric wrote:
Show nested quote +
On May 01 2012 00:27 Fateless wrote:
This is a silly question, and an apples to oranges comparison to be honest. A lot of you are showing your lack of experience through your answers. Also, it makes me laugh that you say you are just learning but that "You always liked divs" What, so you've been doing this for a month and you've already got an established preference?

Yes, so far i liked divs more.


Well the problem is just that you have a fundamental misunderstanding of how to use the tools you're talking about. I would try to stop thinking about CSS positioning and tables as having the same purpose; they do not.

When you get into dynamically outputting content you're going to find a lot of situations where tables save you time and produce more consistent results with more compact code that is easier to read. You may then want to apply CSS classes directly to those tables. Even the most pure CSS layout is probably using a <ul> or two. CSS and HTML work together, and tables are just one example of a tag you can apply CSS classes too. It does suck to overuse tables though. You want to make sure you aren't doing things like nesting tables to create a monster layout that would be much simpler with three lists and Float - Clear.

Don't develop a bias towards one tag or method, that kind of thinking is only going to hold you back. As you get more experienced and learn how and when to use code, you will be thankful for every tool you can get your hands on.

Edit: Grammar
Fateless
Profile Joined January 2011
United States99 Posts
April 30 2012 18:01 GMT
#18
On May 01 2012 02:11 Chargelot wrote:
Is it wrong to put your tables inside of divs?
^new to CSS/HTML, genuine question.



Yes, and no.

Again, there's no hard and fast rule. In many situations you would want to be using classes and apply the class directly to the table.

It depends on the situation though, you might wrap your whole layout in a single div tag with a class applied to constrain the page or set margins.
pQylling
Profile Blog Joined September 2010
Denmark139 Posts
April 30 2012 18:52 GMT
#19
From my own experience I can say that minimal use of tables is the best use of tables. They make everything harder and CSS was basically invented to get rid of table dependant design, among other factors of course. There are situations when tables are the best option, but they shouldn't be overused.
sapht
Profile Blog Joined August 2010
Sweden141 Posts
Last Edited: 2012-04-30 19:27:22
April 30 2012 19:23 GMT
#20
Use tables for tables.

Use blocks/divs for layout.

They're not opposed. Tables are also useful for very detailed and structured groupings of elements, such as the icons atop this reply field.

Oh and I practically never use them because I hate typing too much and I do very little front-end work, so nobody expects my stuff to look pretty.
You can use control groups to train units without even looking at your base.
1 2 Next All
Please log in or register to reply.
Live Events Refresh
Monday Night Weeklies
16:00
#26
RotterdaM1593
TKL 607
ZombieGrub341
IndyStarCraft 262
BRAT_OK 128
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 1593
TKL 607
ZombieGrub341
IndyStarCraft 262
BRAT_OK 128
Livibee 77
ProTech35
StarCraft: Brood War
Britney 21299
Calm 3979
Rain 1463
Shuttle 566
EffOrt 534
firebathero 327
Backho 59
Aegong 22
Movie 14
Dota 2
BananaSlamJamma304
capcasts50
Counter-Strike
ScreaM1164
pashabiceps476
Foxcn345
Stewie2K334
Heroes of the Storm
Liquid`Hasu395
Other Games
gofns8270
Grubby3805
FrodaN1771
fl0m790
Skadoodle257
C9.Mang0164
ToD157
Trikslyr42
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• kabyraGe 85
• poizon28 21
• Reevou 4
• IndyKCrew
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• Migwel
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 3494
Other Games
• imaqtpie1110
• Shiphtur418
• Scarra380
• WagamamaTV325
Upcoming Events
Replay Cast
4h 13m
Afreeca Starleague
14h 13m
Soma vs Bisu
OSC
18h 13m
OSC
22h 13m
MaxPax vs Gerald
Solar vs Krystianer
PAPI vs Lemon
Ryung vs Moja
Nice vs NightPhoenix
Cham vs TBD
MaNa vs TriGGeR
PiGosaur Monday
1d 4h
The PondCast
2 days
OSC
2 days
Wardi Open
3 days
CranKy Ducklings
4 days
Safe House 2
4 days
[ Show More ]
Sparkling Tuna Cup
5 days
Safe House 2
5 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.