0

Which is best to use to layout a website?

I know that ideally both are used together but recently i have came across many examples where html tables are used and arranged to contain elements and control layout.

Just wondered if using html tables for website layout is effective in your opinions? as well as or separate to using css commands such as float: etc?

Thanks

9
Contributors
10
Replies
12
Views
5 Years
Discussion Span
Last Post by brainfo
Featured Replies
  • Tables are not used as layout, since the 90s. they were the tool then only because there was nothing else tables as a layout tool are 80% layout 20% content, the page becomes huge, slow, difficult to edit, every page must contain the full table css layouts are smaller, simpler … Read More

0

The generally preferred method is to separate content from style unless the content would logically be presented in a table.

That said - sometimes using tables to tightly control elements is the only way to go.

For myself - I position elements using css unless it's tabular data. I don't mind if a page looks different from one browser or monitor to another as the content is more important. But I do try to make sure that it doesn't actually break.

0

For me using html and css together is best .
It has lot of advantages
A single CSS file can contain positioning, layout , font, colors and style information for an entire web site. The file can be referenced by each html file on the site.

0

Thanks for the replies.

Think i might experiment with each path. I'm creating a dynamic website but i want it to appear the same on all browsers and screen resolutions and i've always had problems with doing that.

0

Depending on how complex your design is - and how dynamic, getting it to look exactly the same may not be possible. But you can get close.

0

It's not a question of either or. Tables for whole page layouts are strongly discouraged in today's web standards. Tables for tabular data is using tables for what they were meant to do. You can read more about why tables for layouts are bad here.

With that said, dynamic pages are created using content pulled from databases. Many times the use of tables are fully warranted in this type of presentation. For instance: you have a page that displays products you are offering site visitors.

Even then CSS, which is how CONTENT is styled regardless of whether its div based or table based, can be used to style your page(s). The w3c.org says that separating content from presentation is the correct and semantic way of web design.

Edited by teedoff: n/a

1

Tables are not used as layout, since the 90s. they were the tool then only because there was nothing else
tables as a layout tool are 80% layout 20% content, the page becomes huge, slow, difficult to edit, every page must contain the full table
css layouts are smaller, simpler to maintain, the layout is downloaded once, in the style sheet, the page is 80% smaller = 500% faster to load

even with data from a db, dynamic pages, css layout is easier to construct, maintain, and design, tables to present the information, tables have that ideal use, for tabular data,

there are still sites laid out in tables,
alligators are the remnants of dinosaurs, the same reason, too stupid to die out.

Edited by almostbob: cant spell

0

From the above comments it is clear that content is to be written in HTML and the styling is to done in separate CSS file.
It is not recommended to use table in HTML until required to be shown in tabular way.
Well done guys.

0

Use DIV for page layout design and use Table for inside things e.g Forms etc

DIVs are preferable and little weight than tables.

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.