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.

Tables or Div's? or both?

Featured Replies

I was just wondering what the general opinion was for placing elements where you want them when laying out a site.

I have used tables in the past but recently I have been using divs and both have difficulties.

I am taking a course and the material I'm studying says that tables should only be used when you need to display alot of detailed content. but I have also seen quite a few "professional" sites using tables to layout all the stuff on the site??

I guess it will come down to personal preference but is there a reason to use one over the other?

 

Just want to clear it up so so I don't get into the habbit of using one and then find out I shouldn't be!

 

Many thanks.

Tables were viable in the 90's.

 

Tables were designed for TABULAR data, they were abused for design, and unfortunately the web is still having problems shaking that.

 

Style and content should remain separate, style should never be a part of the actual content of the page. Check out css zen garden to understand why html and css should remain seperate, and the big benefit to it (you can redesign an entire site with 100's of pages by editing 1 css file, if tables are involved you have to manually edit the pages as well).

 

use css to style your websites, use tables for displaying your tabular data. There should be thousands of detailed articles on this subject around the web.

Divs all the way.... better positioning, structure and usability.

  • Author

TABULAR!!!!! That was the word I was trying to think of!!!

 

Thanks for the reply guys. Cleared that one up nicely!

:)

I have also seen quite a few "professional" sites using tables to layout

Because they're made by a large team of people, all throwing about code that they were taught early in life.

 

Divs are simpler and don't really have many problems. Issues with IE6/7 don't take more than 5 minutes to fix.

 

 

HAHA!!! That's soooo funny!

 

There source code is even funnier!

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Should I use tables for layout?</title>
  <style type="text/css">
  html,body{
   background:#999;color:#ccc;
  }
  h1{
	font-family:"Georgia",Helvetica,Arial,Sans-Serif;
	font-size:10em;
	padding:.1em 0;
	text-align:center;
	color:#333;
	margin:.5em auto;
  }
 </style>
</head>
<body>
 <h1>No.</h1>
 <!-- Honestly, no. -->

 <!--
<table border="0" width="100%">
  <tr>
	<td align="center">No.</td>
  </tr>
</table>
 -->
 <!-- Fact: Chuck Norris hates layout tables! -->
</body>
</html>

Tables in layouts yes for certain uses!

FOR LAYOUTS NOOOOOOOOOO! REASON i never learned html first insted of flash as.

 

Why would use tiles for a base and bricks for a roof?

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.