Hacker News new | ask | show | jobs
by ok123456 851 days ago
What would stop it from being styled by CSS in the same way? You could use it for semantic markup.
1 comments

It would be messy. If <center> element is used somewhere else then you will have to find its parent classes. If they don't have proper parent div classes or <center> used in many places then you will have to individually target <center> elements like div > div > div > center and another one div > div > div > div > center.

You can override center too but why would you try that instead of creating a class for a div and addressing it properly. Classless elements cause long-term issues when modified with CSS.