Never, but there’s an exception. If you are displaying tabular data, it’s fine to use.
A quote from CSS-Tricks:
So, when should we use<table>? Actual tabular data, of course! If you need to display a list of baseball scores, statistics or anything else in that vein, <table> is your friend.Ryan Grist. 2020. Why Do Some HTML Elements Become Deprecated? (April 2020). Retrieved September 6, 2020
What about using
display: table-cell (CSS)?
In the Stackoverflow post titled How (and why) to use display: table-cell (CSS), this is interesting:
“..there is no good reason, and you should probably never do this.”
“In my over a decade of experience in web development, I can’t think of a single time I would have been better served to have a bunch ofhttps://stackoverflow.com/a/52749835/175956
displaystyles than to just have table elements.”
At CARFAX, we share best practices like this, apply the knowledge gained, and grow together. CARFAX and its members also share knowledge with the community at large.
Do you like challenges? Here’s one: What will you do to share knowledge with others today? If you’re looking for ideas, I have one. Feel free to share this blog post on Twitter or any other social media platform and let me know, please.
Thanks and have a great day!