css - Why not use tables for layout in HTML? -


it seems general opinion tables should not used layout in html.

why?

i have never (or honest) seen arguments this. usual answers are:

  • it's separate content layout
    but fallacious argument; cliche thinking. guess it's true using table element layout has little tabular data. what? boss care? users care?

    perhaps me or fellow developers have maintain web page care... table less maintainable? think using table easier using divs , css.

    by way... why using div or span separation of content layout , table not? getting layout divs requires lot of nested divs.

  • readability of code
    i think it's other way around. people understand html, few understand css.

  • it's better seo not use tables
    why? can show evidence is? or statement google tables discouraged seo perspective?

  • tables slower.
    an tbody element has inserted. peanuts modern web browsers. show me benchmarks use of table slows down page.

  • a layout overhaul easier without tables, see css zen garden.
    most web sites need upgrade need new content (html) well. scenarios new version of web site needs new css file not likely. zen garden nice web site, bit theoretical. not mention misuse of css.

i interested in arguments use divs + css instead of tables.

i'm going go through arguments 1 after , try show errors in them.

it's separate content layout fallacious argument; cliché thinking.

it's not fallacious @ because html designed intentionally. misuse of element might not out of question (after all, new idioms have developed in other languages, well) possible negative implications have counterbalanced. additionally, if there no arguments against misusing <table> element today, there might tomorrow because of way browser vendors apply special treatment element. after all, know “<table> elements tabular data only” , might use fact improve rendering engine, in process subtly changing how <table>s behave, , breaking cases misused.

so what? boss care? users care?

depends. boss pointy-haired? might not care. if she's competent, care, because users will.

perhaps me or fellow developers have maintain web page care... table less maintainable? think using table easier using divs , css.

the majority of professional web developers seem oppose you[citation needed]. tables are in fact less maintainable should obvious. using tables layout means changing corporate layout in fact mean changing every single page. can very expensive. on other hand, judicious use of semantically meaningful html combined css might confine such changes css , pictures used.

by way... why using div or span separation of content layout , table not? getting layout divs requires lot of nested divs.

deeply nested <div>s anti-pattern table layouts. web designers don't need many of them. on other hand, such deep-nested divs don't have many of problems of table layouts. in fact, can contribute semantic structure logically dividing content in parts.

readability of code think it's other way around. people understand html, little understand css. it's simpler.

“most people” don't matter. professionals matter. professionals, table layouts create many more problems html + css. saying shouldn't use gvim or emacs because notepad simpler people. or shouldn't use latex because ms word simpler people.

it's better seo not use tables

i don't know if true , wouldn't use argument logical. search engines search relevant data. while tabular data of course relevant, it's users search for. users search terms used in page title or prominent positions. therefore logical exclude tabular content filtering , cutting processing time (and costs!) large factor.

tables slower. tbody element has inserted. peanuts modern web browsers.

the element has got nothing tables being slower. on other hand, layout algorithm tables harder, browser has wait whole table load before can begin layout content. additionally, caching of layout won't work (css can cached). has been mentioned before.

show me benchmarks use of table slows down page.

unfortunately, don't have benchmark data. interested in myself because it's right argument lacks scientific rigour.

most web sites need upgrade need new content (html) well. scenarios new version of web site needs new css file not likely.

not @ all. i've worked on several cases changing design simplified separation of content , design. it's still necessary change html code changes more confined. additionally, design changes must on occasion made dynamically. consider template engines such 1 used wordpress blogging system. table layouts literally kill system. i've worked on similar case commercial software. being able change design without changing html code 1 of business requirements.

another thing. table layout makes automated parsing of websites (screen scraping) harder. might sound trivial because, after all, it? surprised myself. screen scraping can lot if service in question doesn't offer webservice alternative access data. i'm working in bioinformatics sad reality. modern web techniques , webservices have not reached developers , often, screen scraping way automate process of getting data. no wonder many biologists still perform such tasks manually. thousands of data sets.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -