4 ms·
It keeps style instructions together instead of mingling them with data and behaviour attributes. There's some exceptions with some elements having attributes l
by have_faith 5y ago
It keeps style instructions together instead of mingling them with data and behaviour attributes. There's some exceptions with some elements having attributes like width and border but it's mostly historical.
- tannhaeuser 5y agoDo you really believe that "style" requires entire new syntax, as opposed to "data" and "behavior", vague as these categories are? In a markup language based on SGML already chock full of syntactical constructs for managing/inheriting item-value pairs? In SGML, attributes are exactly there for things that aren't to be displayed to the user; the idea that attributes are for "behaviour" or whatever is entirely made-up after the fact to justify CSS' existence.
- have_faith 5y ago> Do you really believe that "style" requires entire new syntax Well it depends what you mean by entirely new, the syntax is that of a stylesheet. If we didn't have external stylesheets then maybe it wouldn't make sense to have a style attribute? but we do, so there seems to be some some logic for why we have an attribute that mimics it. Not really sure if this is a worthwhile conversation to be honest as you seem to want this to be much more antognistic than it needs to be. Good luck in your quest.