I just started learning HTML, but I am already familiar with XML. It seems strange to me that an HTML style element is structured like this.
<style type="text/css">
.style1 { width: 250px; }
.style2 { width: 20px; }
</style>
Instead of the current format, I would have expected a more XML-friendly approach. For instance, something like this:
<style type="text/css">
<style1 width="250px"/>
<style2 width="25px"/>
</style>
In my opinion, the latter would be easily parsed by the XML parser, while the former would require custom parsing code. This departure from the usual practice makes me wonder if there is a valid reason behind it.
Thanks,
Michael