Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

No errors, no warnings, no gods, no masters - HTML Purity is a Fetish

· 2 comments · 950 words · Viewed ~2,221 times


The HTML5 Logo.

"The problem with defending the purity of the HyperText Markup Language is that HTML is about as pure as a cribhouse whore. The standard doesn't just borrow concepts from better languages; on occasion, HTML has pursued other programming languages down alleyways to beat them unconscious and rifle their pockets for new syntax." Englitch is an pretty goode langwidge. even you no grok all the…

Some thoughts on HTML's proposed previewsrc attribute

· 3 comments · 650 words · Viewed ~1,579 times


The HTML5 Logo.

One of the great things about modern HTML is that it tries to standardise stuff that developers are already doing. If there are a myriad ways of, for example, loading video onto a page - then browsers and other interested parties should work out how to make a standard <video> element. An interesting new proposal has been brought forth by Microsoft. There are a dozen ways to show a preview of an…

How to get a DOI for your blog posts

· 8 comments · 2,150 words · Viewed ~6,435 times


The DOI logo.

Each new post on this blog now has a Digital Object Identifier. This post looks at the how and the why of getting one, whether it is useful, and any issues you might experience if you go down this path. Table of ContentsBackgroundGetting a DOI the easy wayLet's Go Rogue!Automatic Submission of New ContentManual Submission of Old ContentGetting the DOIGenerating your own DOIMaking the DOI…

A simple "copy this code" button in JavaScript

· 2 comments · 400 words · Viewed ~2,151 times


The HTML5 Logo.

Next to all the code samples on this blog is a little "copy" button. That makes it easier to grab any of the code I've shared. The HTML and JS is delightfully simple: <button onclick="navigator.clipboard.writeText( this.parentNode.getElementsByTagName('code')[0].textContent );" title="Copy code" >⧉</button> The navigator.clipboard.writeText needs a user interaction to w…

Death to px, long live ch!

· 10 comments · 400 words · Viewed ~15,321 times


CSS Logo.

Pixels are a lie. Even if you think you're drawing something with "pixel perfect" accuracy, your monitor is lying to you. There is no grid of platonically perfect squares. In CSS, pixels are a double lie: Note that 1px doesn't necessarily equal one physical device pixel. On HD displays, it may span multiple physical pixels. Similarly, 1cm in CSS often doesn't correspond to one hundredth of SI…

Metadata for AI Generated Outputs

· 7 comments · 1,050 words · Viewed ~1,782 times


A confused little cardboard robot is lost amongst the daisies

How do you tell users that the text they're about to read has been synthetically generated? It is polite to readers that you don't waste their time, it's also important that LLMs don't feed on their own regurgitated slurry lest they pollute their own development. I think there are a number of potential ways to do this and I'd be interested in your thoughts. Let's go with some bad ideas first. …

Should HTML's code blocks be translated?

· 2 comments · 450 words · Viewed ~411 times


The HTML5 Logo.

I was recently prompted to test my blog's layout when rendered in right-to-left text. Running a website through an automatic translator into a language like Arabic or Hebrew will show you any weird little layout glitches which might occur. But mechanical translation is a bit of an unthinking brute. In this example, I had a code snippet which contained the word "link". Should that word be…

Maximally Semantic Structure for a Blog Post

· 3 comments · 400 words · Viewed ~793 times


Screenshot showing the structure of the page.

Yes, I know the cliché that bloggers are always blogging about blogging! I like semantics. It tickles that part of my delicious meaty brain that longs for structure. Semantics are good for computers and humans. Computers can easily understand the structure of the data, humans can use tools like screen-readers to extract the data they're interested in. In HTML, there are three main ways to …

Fixing "Date/time not in ISO 8601 format" in Google Search Console

· 300 words · Viewed ~298 times


Date/time not in ISO 8601 format in field 'datePublished' Items with this issue are invalid. Invalid items are not eligible for Google Search's rich results

I like using microdata within my HTML to provide semantic metadata. One of my pages had this scrap of code on it: <time itemprop="datePublished" itemscope datetime="2025-06-09T11:27:06+01:00">9 June 2025 11:27</time> The Google Search Console was throwing this error: I was fairly sure that was a valid ISO 8601 string. It certainly matched the description in the Google…

Stop crawling my HTML you dickheads - use the API!

· 9 comments · 350 words · Viewed ~15,171 times


The JSON logo.

One of the (many) depressing things about the "AI" future in which we're living, is that it exposes just how many people are willing to outsource their critical thinking. Brute force is preferred to thinking about how to efficiently tackle a problem. For some reason, my websites are regularly targetted by "scrapers" who want to gobble up all the HTML for their inscrutable purposes. The thing is, …

The Idiot Sandwich - On Embedding Alt Text

· 6 comments · 400 words · Viewed ~801 times


Screenshot showing broken images. The alt text on them reads "October 02, 2023, Kolkata City, India,: An Indian hairdresser finishes the haircut showing a Cricket World Cup design make at a hair salon near Kolkata on 2 October 2023 in Kolkata". Another says "Doja Cat attends the 2023 Video Music Awards. The singer has short bleached blonde hair and dark brown eyes. Her makeup includes thinly drawn on eye brows, purple eyeshadow, false spidery lashes and gems dotted around her eyes. She wears a spider shaped ear cuff and long dangly silver earrings." A third says "Olivia Rodrigo in the Live Lounge. Olivia is a 20-year-old woman with long brown hair worn loose over her shoulders. She wears a white silk slip-style dress with a lace trim and has red lipstick on. She holds a microphone stand with both hands and closes her eyes as she sings."

Alt text is great. It allows people who can't see an image to understand what that image represents. For example, the code might say: <img src="whatever.gif" alt="Two cute kittens are playing on a blanket"> If you are blind, you get an idea of what's being conveyed by that image. If you're on a train and the WiFi craps out just before the image loads, you'll also benefit! If the image is of…

Magazine Review: DOCTYPE

· 8 comments · 550 words · Viewed ~464 times


Magazine cover featuring a spaceship and pyramids. It says "10 amazing web pages".

D'yer remember the eighties? The eighties, eh? Remember 'em? With the Acorn Archimedes an' that? What were we like? Remember them mags what y'got? The computer mags? Wirral the source code? Remember typin' it all in be hand? If yer semicolon were outta place y'd gerra syntax error! And you try telling that to the young people of today, will they believe yer? For those of you born this century,…