CSS Grids vs HTML Tables

CSS Grids vs HTML Tables
0.0 0

#1

I am currently taking Colt Steele’s Web Developer Bootcamp and using FCC to supplement the material. I am about to finish the CSS and HTML section of FCC and found it interesting that FCC teaches CSS grids but not HTML tables while the Bootcamp is vice versa. I found a StackOverflow post(link below) pertaining to the same subject and generally agree with the OP that HTML tables make more sense because a table/grid changes the structure of a website rather than its styling. Why does FCC pick to teach CSS grids over HTML tables?


#2

I think it is because CSS Flexbox and CSS Grid are more modern technologies that were designed with page layout specifically in mind, where as tables had a different purpose but were commonly used for page layouts before there was a better solution.

From: https://stackoverflow.com/questions/3176896/what-is-this-i-hear-about-the-table-tag-being-deprecated

“The table tag is most certainly not deprecated. The thing is, you must (well, should) only use it for tabular data. It was and sometimes still is being abused for layout purposes, which is extremely bad practice for a variety of reasons, and CSS is the preferred technology to use there.”


#3

tables are for showing tabular data, not for laying out your website.

Back in the 90s before we had the ability to position html, tables used to be the only way to ensure your website worked across browsers. However they are extremely hard to update and unnecessarily complicated. The only people still using tables for design are Email Devs but only because email clients are stuck in the 90s. (I’m an email dev btw)

If this bootcamp is teaching you to use tables I have said news for you, you’re going to be very limited in what you can do. Very. HTML has moved to be semantic markers both for accessibility and readability. Tables do not allow for this. CSS styling includes position, as well as colors, so separating content from layout is actually scalable. Not cliche thinking. The OP has never had to update 1000s of table based pages I see. That will driver you insane very quick.

Ha, they only understand it’s a table because it says the word Table. That means that you have to decipher a heading instead of know its a heading which you would know if it were standard, semantic HTML And don’t understand CSS, um learn. The rest is utter nonsense. Do some research instead of demanding others do it for you.

Finally updating… Yeah maintaining an table based website is a beast. It sucks enough for one 1000 line email. If you haven’t had to do a website, then you don’t know pain. To accomplish the same layout in tables takes 100s of lines of code which can be accomplished with 3 lines of CSS and 6 of html. It gets worse from there. I could spend days or weeks writing tables but why would I? Even in email we use gulp and frameworks to generate table code so we don’t have to do that nonsense.