views:

136

answers:

5

I have a friend who wishes to work as a freelance web developer, but insists that tables are the way forwards for layouts.

Several points he maintains in favour of tables:

  1. This is what was taught at the beginning of 10 years of programming & computer science degrees, thus it 'must' be right.
  2. Large companies use tables to achieve 'technical' things (like server side scripting and working with forms)
  3. It saves time.

I have coded him some examples of CSS exactly matching table based layouts, and provided many links to articles explaining SEO and accessibility benefits.

With regards to semantic uses of HTML tags, I have explained at length with examples how tables are great for displaying tabular data but not for general layout.

From the perspective of a client, I have been explaining to him that I wouldn't hire someone using outdated methods as their main strategy for layout. As he is my friend and I wish him every success, I believe it is important for him to gain the best start when pitching for work.

The question again: How can I explain to a programmer that CSS positioning has many benefits over table based layouts?

+1  A: 

This is what was taught at the beginning of 10 years of programming & computer science degrees, thus it 'must' be right.

So were frames and marquee tags. people dont use that anymore for a reason

Large companies use tables to achieve 'technical' things (like server side scripting and working with forms)

If by 'technical' things he means ugly looking things, then hes right. also as i said, tables are good for tabular data, and you SHOULD use them for that. also, i dont see how server side scripting and forms have anything to do with tables.

It saves time. Yeah it does, at least initially. if you want your code to be maintainable in the long run, tables will not save you time.

I would say that an approach that uses both tables and divs/css is best.

mkoryak
"I dont see how server side scripting and forms have anything to do with tables."My thoughts exactly ;)
Pat
Well forms do a bit, because it's common to have forms in a tabular layout. When you're using liquid layout it's difficult-to-impossible to recreate all but the simplest (one-label-plus-one-input-per-row) form layouts with just CSS float/position. In this case a table can be helpful and not too distasteful. Naturally with `table-layout: fixed`, and not using any of the horrorshow table-nesting tricks of last century. Server-side scripting though? er...no.
bobince
A: 

I love this question. It does seem still to be a tough cookie.

I'm a developer, and prefer CSS for everything. first of all

1> This is what was taught at the beginning of 10 years of programming & computer science degrees, thus it 'must' be right. - HA

  • Table format as I've seen is a presentation thing. Therefore should be removed from the logic.

  • Working with designers, allowing them to change a tables format at will is a big bonus for the freedom of design.

  • Tables definitely still have their place in the world but large companies only use them as the techincal team are often met with larger challenges than the choice for a table layout or presentation changes

  • It can save time, but can later meet other problems, again with redesigns, SEO, accessibility.

I've had the problem when wanting to add another field... inside of <div class='cell'>my new field data</div> POP DONE - you have to fiddle with all manor of table formatting, which is time consuming and tedious -


"Working with designers, allowing them to change a tables format at will is a big bonus for the freedom of design." I don't understand this point, could you elaborate further? I am a designer first and have only been learning web coding to meet my clients web design needs. My friend is a programmer, and needs my design skills to help him gain business.

Well, its my experience, every designer has the right to say "I'd like to move that field slightly to the right by three pixels" - with a table it tough to break out the box. Giving the designer an option to either present something in a table format, or do magic -

For example, today - working with Google maps - its my mind, the route steps (directions you get for turn by turn roads) I saw that as a table and thats it. Later the design scope was changed and it was no longer a simple table format. If I did do table stucture - it would have been a recode on my side or an ordeal on the designers part.

Glycerine
"Working with designers, allowing them to change a tables format at will is a big bonus for the freedom of design."I don't understand this point, could you elaborate further?I am a designer first and have only been learning web coding to meet my clients web design needs. My friend is a programmer, and needs my design skills to help him gain business.
Pat
+5  A: 

Show him CssZenGarden. You can't do that with tables.

Designing with tables is really easy. Changing a tables design, such as "Put navigation on the left instead of the top," is anything but.

Devon_C_Miller
A: 

Tables were used for layout because that's all we had. It's always been a hack, they were never intended to do all of the things they were put in to. Surely, most programmers today know the history of HTML enough to know why things were put in place how they were...and that at the time of their invention we had NO idea what the internet would become.

No one put them out as a design mechanism, at least no in the way they ended up. So the argument that "that's how it always was" falls flat there. It was that way because we hadn't come up with the right way yet.

I don't personally think it saves time, either. You spend as much time repeating yourself and typing those irritating tags over and over again, all the while keeping straight how many columns your currently supposed to be spanning.

Table-less design has so many advantages (unless you're displaying tabular data). They are more accessible, easier to manage, (generally) smaller...the list goes on and on.

Anyone who is still holding out is simply either not willing or not able to learn tableless design.

Gus
A: 

Tell the programmer to look up accessibility requirements and/or 508 standards. Depending on his target market that should mean it's a requirement.

Otherwise challenge him to a contest. Take a scenario of a potential client that likes the functionality but wants this button moved there, that menu moved here, blah, blah, blah. See who wins.

In your friends defense. If he is targeting small businesses, most of them probably won't know the difference if he uses tables or CSS. They just want a site that works.

It really sounds like your friend is just lazy. He's not going to last as a free lance developer for long if he insists on not keeping up with the technology and trends.

Frenchie
>In your friends defense. If he is targeting small businesses, most >of them probably won't know the difference if he uses tables or >CSS. They just want a site that works.While valid, this is one of the points made by my friend. Yet from an SEO and accessibility perspective, he will be doing the client a disservice using frames.What if a potential client knows html but doesn't have time to code a site themselves? If they see my friends site code they won't hire him.By using the best techniques possible, surely he opens the door to more clients regardless of their technical knowledge?
Pat
Using best practices like you say will give him the potential for the largest client base. Not just people that don't know anything. Besides non-technical people are more impressed by the "magic" of CSS than the mess that is table layouts. Accessibility should be his primary concern since that's something he can use to sell his services.
Frenchie