Hacker News new | ask | show | jobs
by cxr 30 days ago
> the class="" property is in the HTML and that is the styling info

The class attribute (not "property") is in the HTML because it's part of HTML. It's markup. Element classes weren't created either by or for the CSS people when CSS came along. The class attribute predates CSS by years and has no more relation to "styling info" than the id attribute does.

1 comments

Yes, and that’s what it’s used for now due to the ad hoc development of HTML and CSS.
What?