Write HTML Right
Link: Write HTML Right by Aaron D. Parks. Published 10 Jun 2022.
This is a good read on how using a minimal approach to valid HTML makes writing it easier.
This is a good read which suggests taking an ultra-minimal approach to writing valid HTML – sans most head
bits and pieces, the body
and html
and by omiting closing tags. You’ll also learn about a wayback, Markdown-like language called troff (my word of the week).
You can see how much easier it is to write HTML when we don’t close tags:
<h1>
An exciting article
<p>
This is a good read.
I can even start new sentences on new lines.
Jens made the same argument, but posited different reasons. You’ll see some disagreement in the comments. Perhaps Jens was writing for the wrong audience – if you’re a developer you’re probably creating templates rather than longform documents. Agreement and clarity is all important, and an XHTML mindset suits programmers. And if you are a developer who blogs, you’re using Markdown rather than handcrafting HTML.
Which raises the question who actually writes HTML these days? If you blog you probably use some form of rich text editor or Markdown. If you’re taking a purist approach and want to remove all technical dependencies this could be for you, but you’re in a tiny minority.
But then it occurred to me that people are still writing HTML. In fact, I’m one of them. Web editors will often have to deal with text copied from Word, content submitted by non-editors or even a CMS that struggles to output paragraphs rather than a stream of
s. Often we enter the HTML to fix the content and make it accessible. Minimal, valid HTML could make our lives easier.