Mobile app version of vmapp.org
Login or Join
Kevin317

: What happened to HTML table tags? I started to code HTML in 1998, and in that time I used a lot table tags, playing with tr and td, I learned many things analyzing the source code of many

@Kevin317

Posted in: #Html

I started to code HTML in 1998, and in that time I used a lot table tags, playing with tr and td, I learned many things analyzing the source code of many portals on the internet with notepad and Microsoft FrontPage, the latter, aw, how many tables overlapping others, it was fun, I loved that time.

However, I abandoned web programming for almost seven years and this year I decided to see what web programming is like today. It seems completely different, as most sites do not use table tags, and instead use div and span tags.

Why did this happen? What are these new tags and why are table tags no longer used?

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

5 Comments

Sorted by latest first Latest Oldest Best

 

@Shelton105

Tables still exist in html spec. But they should be used for displaying data in a tabular form! (Although table markup has evolved somewhat, with column and group labels somewhat easier to apply in a sensible fashion).

If you have pictures and news content you want to write up for a webpage, you should stay well clear of tables for the reasons outlined by other people answeing this question.

If you want to display a months accounts in a page, then by all means, you should be using tables to do this.

10% popularity Vote Up Vote Down


 

@Murray155

I secretly still use them.

Most importantly they are still in HTML5: www.w3schools.com/html5/tag_table.asp. So it is perfectly safe to use them for your twisted layout needs.

Edit: (After being down-voted a bit)
A great example of a "twisted layout need" is to use tables in your mass e-mails. If you want your junkmail to look as sexy as the promised effect of your product, you can't use most CSS.

I don't always use dirty hacks, but when I do I prefer hacks that will last for the next ten years.

10% popularity Vote Up Vote Down


 

@Nimeshi995

Not nobody, a few years ago (and still, if you support IE 6) tables were the best choice to assert same layout for all browsers.

Frameworks that refused to used tables to do layout, like Ext, ended calculating dimensions dynamically via changing styles on resize, which maked them work buggy on some browsers (IE 6 mentioned before).

Tables are still used as basis for grid layouts in various frameworks (Icefaces e.g).

10% popularity Vote Up Vote Down


 

@XinRu657

The World Wide Web Consortium (W3C) developed the first Cascading Style Sheets specification in December of 1996. Cascading Style Sheets (CSS) have since radically evolved and made the separation of HTML content from presentation data more common among popular sites.

Though present-day sites may still rely upon inline style declarations to achieve desired effects, it is far more efficient to include presentation data (element height, width, padding, margins, absolute positioning, etc) in a single CSS file referenced by multiple HTML documents than to update every instance of the HTML content when presentation needs change.

Browser adoption of CSS did not occur overnight (which is why some major sites still relied upon tables to achieve uniform presentation across a variety of browsers well into the 2000's) and, while some browsers continue to differ in their implementation of W3C CSS specifications, graphical browsers which do not support CSS1 are very uncommon, so very few popular sites rely on tables to achieve cross-browser compatible presentation.

The 12 Lessons for Those Afraid of CSS and Standards article (published in 2006) at A List Apart and a review of the W3C's CSS Snapshot may be a good starting point if you would like to catch up on the transition from table-based layouts to CSS.

10% popularity Vote Up Vote Down


 

@Angie530

Without getting into an entire history of web dev evolution...
Tables were never meant for doing page layout; this is the most important bit. Using them that way was a workaround brought about by the technology of the time, both incomplete specs and incapable browsers. Eventually those issues were (mostly) addressed and now it's not really necessary anymore.

The SE sites are generally for more practical questions, eg. how do I... but if you want more detail, many beginner-level HTML books–and it does seem you're starting all over–have a condensed overview of what you're asking about as introductory material.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme