5 ms·
Article misses one element of great markup language: to reduce complexity, there should be only one mechanism for expressing things. HTML-style attributes are u
by kukkeliskuu 4y ago
Article misses one element of great markup language: to reduce complexity, there should be only one mechanism for expressing things. HTML-style attributes are unnecessary. Anything you can express with an element, you can also express with attributes. Attributes are there probably because the overall model of XML/SGML is so complex.
- goto11 4y agoAttributes exist because HTML is a markup language where text is the primary content and markup adds structure and metadata. Eliminating attributes would mean metadata should be expressed as text content, which in turn means it is not really a markup language anymore, just a generic data structure syntax like JSON or s-expressions.