for layouts is evil right? [closed]

2020-02-11 13:09发布

问题:

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.

Just found out that this site uses tables for layouts. Does anyone find this disturbing considering the nature of the site? I really don't know what to believe anymore :-)

http://www.w3schools.com/

回答1:

More eloquent people than I have made some compelling arguments to the contrary. Here's some recent (because that's important when it comes to browser technology) essays to check out:

  • http://iamelgringo.blogspot.com/2009/02/tables-vs-css-css-trolls-begone.html
  • http://www.flownet.com/ron/css-rant.html
  • http://thinkvitamin.com/features/css/tables-the-next-evolution-in-css-layout/


回答2:

Tables are good for displaying data that normally fits...in a table. Think a list of Names with associated attributes.

Tables are evil for layout. Layout should be done via CSS.

Separation of data and display is an important concept in all of computer science.



回答3:

It depends on what you are using the table for. And how many tables you are using.

If you are using the table to display tabular data, it is the best. Otherwise, use the modern stuff.

There are times where it is OK to violate purity.



回答4:

I think this page is the most ironic: An introduction to CSS (completely built in tables). It doesn't fill you with much confidence...



回答5:

Yeah I would steer clear of it. Tables should be reserved for tabulated data :) Try to layout sites using div's and CSS