Layout for beginners - tables or CSS?

tables
29% (2 votes)
div's/CSS
71% (5 votes)
Total votes: 7
Megan's picture

She has: 11,421 posts

Joined: Jun 1999

hmmm.... actually testing it all would be too much work especially since it isn't the point of my article at all. The point is the design not the coding. The coding is really a sidenote. I think what I might do is mention both and just say that you can use whichever works best for you. I'll probably have to dig around for some beginner coding resources on that.

I may also write a separate article on the different ways to code a layout and when/why you'd use them.

They have: 27 posts

Joined: Sep 2005

I think that it's very difficult to not be biased... Personally, I find tables a lot less confusing. But, then again I learnt tables first. I think having a few guinea pigs is a very good idea.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

To further clarify my post above, the point of the course I made is that to let them decide the appropriateness of the codes/tags.

Tables for what? css for what? what is the current trend? which one would they prefer for layout? what theyre comfortable with? Thats the point if you try and read it again.

You cant force someone to design something in other than what they prefer, as davey said what gets it done with less hassle is the way to go. Since youre giving out tutorials, just point out the quickest solution to them. Just dont be biased over one designing process over the other.

DaveyBoy's picture

They have: 453 posts

Joined: Feb 2003

Maybe you need a couple of guinea pigs to test it on Wink Try to teach them the basics of both and see which is picked up the easiest and most logically etc. Get some feedback from them, then you might have your answer from an unbiased perspective.

DaveyBoy's picture

They have: 453 posts

Joined: Feb 2003

All this mention of the 'wrong way' or the 'correct way' is annoying, and i'm just gonna go and earn some more money making a tabled site for someone Smiling Bet ya they don't complain about anything on the site either Wink

heh, but seriously...this thread is just gonna develop into a tables vs css debate again, which wasn't really what the thread was about.

I said before to teach em CSS as it's the current technology.

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Well firstly lets debunk some mythology here:
XHTML/CSS and Tables are not mutually exclusive! Meaning you can have a table in an XHTML strict page, as long as it's to hold tabular data. This is the purpose of the table, nothing more and certainly nothing less.

In my opinion there is no point teaching someone the wrong way to do things at all. So my vote is with XHTML/CSS. Maybe show a table based site for historic interest only.

a Padded Cell our articles site!

Busy's picture

He has: 6,151 posts

Joined: May 2001

JeevesBond wrote: Well firstly lets debunk some mythology here:
XHTML/CSS and Tables are not mutually exclusive! Meaning you can have a table in an XHTML strict page, as long as it's to hold tabular data. This is the purpose of the table, nothing more and certainly nothing less.

Tables for a layout were valid and suggested even when XHTML came out Sticking out tongue

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Busy wrote: Tables for a layout were valid and suggested even when XHTML came out Sticking out tongue

... because it was 1998 and browsers didn't support CSS yet! Yes, please, lets not start all this again!

Thanks for all your feedback!

Edit: Correction - the xHTML 1.0 spec came out in 2000. However, as I've discussed before, the W3 has always been very clear that tables were only used as a substitute while CSS was not available yet)

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

I'm not teaching a full course or anything. I'm just presenting some methods for laying out pages. I don't want to get into teaching HTML at all. I'll direct them to other sites for that. But, if I was writing a piece about how to lay out a web page, which would be focussed on the design not the coding, I would want to suggest some methods of creating those layouts and would provide some sample code. CSS or Tables?

I don't care if people still are using tables. I care about what would make more sense to someone just beginning. These are web designers of the future, not of the past. Although the audience for one of the articles accounting students who really just want to get the job done and most likely won't go much further.

Busy's picture

He has: 6,151 posts

Joined: May 2001

While Demonhale's insight is good, sadly it doesn't work that way in the world wide web (or from a book), in a class you can force the reasoning behind things and set the pace, in a "let them go at it" tutorial they will (and do) jump straight to the neat stuff - displaying content.
I admit to even doing this, I remember when I was looking at a fancy programming book, I skipped all the first stuff until I got to the output examples as I find it easier to work out whats happening from the errors, when you crash the puter then you go back (after the 2nd or 3rd time lol) to the beginning and read the boring (most important) structure bits

They have: 140 posts

Joined: Apr 2006

I agree with demonhale. Tables are an integral part of the HTML language and needs to be taught. Many people are still using tables.
You can then present them with alternative to using tables, which is coding with css. Spend some time explaining css.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

hiya meg, i think i really can help you on this topic since when we started demonhale.com we outreached to our local high schools here teaching them basic html... until we ventured out to college... now those schools integrated it to their school program and was an instructor there for 1 year just to transition them to a pool of new IT teachers. I collaborated some modules and curriculum for those schools that they are still using now.

My suggestions:

Its always better to start with the basics, get everything basic covered in the first part, like the organization of the html, head, body tags... what tags could be coded on those areas and explain it in box forms(drawing boxes to represent areas)... once they get the hang of it, skip directly to internal css tagging... start with text formatting before delving into div, spans, and position relative and absolute...

Time is spent to explain the markups at these stages and they can start building there 1-column site. thats when we start teaching div positioning and external css. after that ordered and unordered lists.

Then we introduce them to presenting tabular data, we would explain table tags are good for those rather than having divs with borders that are visible... once they get the hang of it, we introduce them to the basics of table design...

After that we make a wrap-up exercise one that can only be made through css, and the other only by using tables. The point is to make them decide what to use and what they are comfortable with... and therefore use the codes appropriately as for its intended purpose.

In closing the course, we discuss the rules, like validating, its impact, the current trends in web designing, why they need to know these stuff etc.

I hope that helps...

Busy's picture

He has: 6,151 posts

Joined: May 2001

IMO tables is the best style to teach a beginner - why? because a tabled layout contains structure, a css layout is just ...
Using tables and making the person understand how/why/where will not only open their mind up for things later on like database structure but it will teach them that webpages need a structure no matter if done in html or css (still have the head and body bits that they often trip over).

Tables can be difficult because the person can't understand whats going on, do it the css way and if something goes wrong, oh lets just put another in there, with tables the structure comes into play and once they can understand them the rest will just fall into place.

Tables will never be gone anyways, even if "not the correct" method they still have there place - tabular data.

A lot of newbies can't understand the structure, how many times have you seen doubled up head tags, or head tags down the bottom of a page. Tables can also be good at teaching nesting (very usefull in CSS) with the help of borders

He has: 490 posts

Joined: May 2005

I think most beginners would profit, from just learning how to make a simple in line HTML page first. I see so many pages that lack fundamental markup its not funny.

As far as CSS or Tables go each has its uses, I use a combination of both most of the time. Tables are nor quite so confusing as margins, absolute positioning, float, and some of the rest of the CSS jargon for a beginner. If you are good at tables CSS has very little to offer, and does not present the varying problem from browser to browser, that some of the other more exotic methods do.

As for tables becoming obsolete "it aint so". CSS is not new, CSS originated with Netscape many years ago. And did not gained its present popularity, until the advent of some of these new browsers coming out. The reason Tables seem to be difficult, the newer browsers were designed for CSS by CSS-heads. Who never intended for them to display tables correctly. This is what you call a monitory trying to rule. Smiling

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

I agree with Davey about the use of "correct method". That would depend on how you code (doctype) your pages.

I started with tables long ago... remember when I found out how to use a table t break up a large image into small pieces. That was so cool. Learning the one way and switching to the other can be difficult. Like going from PHP to ASP, you just know off the top of your head how to do it in one, so easy to give up and go back. Wink

Myslef, I finally gave in and did a site in CSS, and IMO it can get just as messy as using tables. I had to nest 3 DIVS to get content that flowed well. I know it is better in general, but for that simple of a layout, a table would have been much easier Wink

I think the key thing is to keep it current and basic to standards, so many time I went to try, jsut to find out I spent an hour doing a tutorial, that while looked good, ended up only working right in one browser.

-Greg

waffles's picture

They have: 54 posts

Joined: Jun 2006

Teach them CSS. There's no reason not to, really. It's not that hard of a concept. And with everything moving away from tables, you're tutorial will become out dated.

waffles Radio Coming to a set of speakers near you September 2006

DaveyBoy's picture

They have: 453 posts

Joined: Feb 2003

I'm biased to tables because that's what I continue to use, but in honesty it's probably better for somebody just starting to learn CSS as it's more future-proof. I don't like it being referred to as the 'correct method' though Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.