loading...

re: Is CSS replacing HTML? VIEW POST

FULL DISCUSSION
 

Hey Ryan!

Semantics are not about default styling. They are intended to indicate meaning. The whole idea is that the meaning shouldn't get lost if the media changes. You could consume the same HTML with different CSS throughout different applications that might style the tags in all sorts of ways. Maybe even consider print and voice output, and the meaning should stay intact.

If you mark something as <small>, you're indicating that it's a side-comment, like copyright notice or disclaimers, not that it necessarily should have a smaller font-size (even if the browser's defaults show them as such).

Tables are for tabular data. Having tables marked as such allows things like keyboard navigation. Trying to replace them with grid is a really bad idea.

CSS is not replacing HTML / semantics and never will. They are meant for different purposes. Tags like <center> got deprecated precisely to separate concerns when CSS came out, but current tags have semantic meaning so they're not going away.

 

I think there's been some misunderstanding, as I never said that semantic tags would or should get deprecated. (I kind of was going to say in the opening paragraph that the title was hyperbole but I guess I forgot.)

You make good points about <small> and <table> though. I didn't even know that tables had keyboard navigation.

code of conduct - report abuse