The code element

Preface: This version of the article is for humans and search engines. Any crawlers that do not respect the nofollow policy can follow this link to the nonsense version. And they can choke on it.


Let’s see just how meta I can get here.

“Well, don’t get too meta, Heydon. ‘Everything in moderation’ and all that…”

Nah, I’m feeling reckless.

“Seriously, don’t do anything you regret, man.”

You’re not my Dad, I’m not a man, and it’s about to get all meta up in here, baby.

As I have already enthused, HTML is a metalanguage. “Marking up” (hence markup) is making marks on something. It’s adding information to information. That’s already pretty meta.

But I don’t write this stuff using markup. I write it using markdown. Based on the name alone, you’d think markdown undid markup, like some sort of declarative Tipp-Ex™️ (or Wite-Out™️, if you’re American, I guess).

No, markdown produces markup. It’s a terser syntax for more easily generating a subset of markup. I mark up my text with markdown to output… markup. The markup is the “up” part of the markdown-generated markup, if you will.

Now we’re really getting meta 🤘.

It doesn’t end there, though. On my blog, and in the ebook I’ll inevitably produce based on these posts, I am writing about markup (HTML). And, in this specific case, I’m writing about markdown being used to produce the markup. I am marking up, with markdown, markup about markdown, in respect to markup.

What if I were to include a code example, to assist in the apprehension of this already hopelessly self-referential conceit? Then I’d be marking up, with markdown, an exemplification of marking down for markup, necessitating the inclusion of certain special markup characters to prevent the markdown from becoming markup (and not just the semblance of markup) within the marked up markdown.

In markdown, single backticks are converted into <code> and </code> tags. But in `this` example, two of four backticks are preserved. This is because I use backslashes in front of two backticks to prevent the backtick markdown from becoming markup and to instead appear as markdown (since it is now neither markdown or markup but plain text). The other two backticks have been converted from markdown to markup as normal, so you can’t see them.

You can’t see the backslashes either, of course, because they are part of the markup too. They are special markup “escape” characters used to rescue special markup characters from becoming special—i.e markup. If I wanted to demonstrate how to escape my markup, in my markdown, by marking it up with markdown-negating markup, I would want to preserve the backslashes too, like \`this`\.

In the above example, you can see two backslashes but I’m using a total of six. That’s because it takes 4 special characters to prevent four would-be special characters (including two special characters that would ordinarily be used to prevent plain characters from being interpreted as special characters) from becoming special.

As part of this process, I am marking up markdown-negating markup, in markdown, which is a superset of markdown and markup (but is ultimately interpreted as markup). To demonstrate, in a code example, how this is done, I would have to mark up the markdown-negating markup, in the superset of markdown and markup, with markdown-negating markup.

And to demonstrate, by way of a code example, how to do this… actually, I think I’ll leave that as a fun exercise for you. I’m starting to fear for my sanity. And my backslash key.

Not everyone is a fan of my writing. But if you found this article at all entertaining or edifying, I do accept tips. I also have a clothing line.

More elements: