Wednesday, March 30, 2022

getting over xhtml-ish html

 Write HTML, the HTML Way (Not the XHTML Way).

That article charts the rise of stricter xhtml conventions in the 2000s. As it says:

XHTML became popular when everyone believed XML and XML derivatives were the future. “XML all the things.” For HTML, this had a profound effect: The effect that we learned to write it the XHTML way.

(and like I wrote a while back I think there are some very solid reasons JSON beat out XML that we should learn from - along with recognizing what XML did better.)

My HTML roots are old, old, old, and some "bad" habits - especially not closing <p> tags (treating it as more of a linebreak than a wrapper) and <li> still persist for me when I'm on my own. But here's my hot take: in the 90s there was a style that tended to put tag names in ALL CAPS:

<TABLE>
  <TR>
    <TH COLSPAN="2">Some Header Information</TH>
  </TR>
[...]

My unpopular opinion is, that was a better way to write HTML. It made the content (whether values of attributes, or text content) look more distinct from the tag names and attributes.

(Of course, even in the 90s that was a bit of a 70s-ish throwback look. BUT STILL!)

No comments:

Post a Comment