What are the different scenarios where you use HTML tables? Just trying to understand if programmers are still using them.
Yes - for tabular data (that is, rows and columns of structured data with headings). That is after all what they are for :)
I don't use tables for any layout purpose - haven't done so for about 15 years now. There are one or two niggly layout cases that were easier with tables, but they are not worth the tradeoff particularly with flexbox becoming feasible; and display:table has been viable for years.
I use tables for listing information also for email templates since most email programs have very little css support.
If it needs a table, it needs a table. No need to be religious. Using <table> at the right occasions does have strong semantical meaning.
Alkshendra Maurya
Frontend Engineer | Hashnode Alumnus
Tables were used earlier for developing layouts when CSS3 wasn't around but that's not the case anymore. The the only logical reason to use HTML tables now is when you're actually presenting tabular data.
Otherwise, you should absolutely avoid using HTML
<table>for layouts.This said, there are cases where html tables can still be quite useful.
One example could be HTML Emails. HTML
<table>is a necessity in html emails because of the lack of CSS support the clients offer.So the thumb rule would be to use tables in systems with little to no CSS support or where the CSS has to be avoided but you still need a layout(like banking/payment applications).