Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

Should HTML's code blocks be translated?

· 2 comments · 450 words · Viewed ~284 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

· 400 words · Viewed ~370 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 ~245 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 ~14,809 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 ~737 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 ~415 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,…

A Self-Hosted Favicon Proxy written in PHP

· 3 comments · 600 words · Viewed ~468 times


The PHP logo.

In theory, you should be able to get the base favicon of any domain by calling /favicon.ico - but the reality is somewhat more complex than that. Plenty of sites use a wide variety of semi-standardised images which are usually only discoverable from the site's HTML. There are several services which allow you to get favicons based on a domain. But they all have their problems. Google Exposes…

Getting started with simple CSS View Transitions

· 1 comment · 400 words · Viewed ~445 times


The HTML5 Logo.

There's (yet another) new piece of CSS to learn! Hurrah! Way back in 2011, jQuery mobile introduced the web to page-change animations. Clicking on a link would make your high-tech Nokia display a cool page-flip as you navigated from one page of a website to another. Just like an app!!!! A decade-and-a-half later, and CSS has caught up (mostly). No more JavaScript, just spec-compliant CSS. Well, …

Quick and dirty bar-charts using HTML's meter element

· 5 comments · 300 words · Viewed ~918 times


The HTML5 Logo.

"If it's stupid but it works, it's not stupid." I want to draw some vertical bar charts. I don't want to use a 3rd party library, or bundle someone else's CSS, or learn how to build SVGs. HTML contains a <meter> element. It is used like this: <meter min="0" max="4000" value="1234">1234</meter> Which looks like this: 1234 There isn't much you can do to style it. Browser manufacturers seem to …

Drunk CSS

· 5 comments · 600 words · Viewed ~23,176 times


Screenshot of the homepage all askew.

A decade ago, I was writing about how you should test your user interface on drunk people. It was a semi-serious idea. Some of your users will be drunk when using your app or website. If it is easy for them to use, then it should be easy for sober people to use. Of course, necking a few shots every time you update your website isn't great for your health - so is there another way? Click the "🥴 …

Targetting specific characters with CSS rules

· 9 comments · 450 words · Viewed ~7,653 times


The HTML5 Logo.

You can't. There is no way to use CSS to apply a style to every letter "E". It simply can't be done. At least, that's what they want you to think… What if I told you there was a secret and forbidden way to target specific characters in text and apply some styles to them? As part of my experiments in creating a "drunk" CSS theme, I thought it would be useful to change the presentation of s…

Class Warfare! Can I eliminate CSS classes from my HTML?

· 1 comment · 1,150 words · Viewed ~670 times


The HTML5 Logo.

I recently read a brilliantly provocative blog post called "This website has no class". In it, Adam Stoddard makes the case that you might not need CSS classes on a modern website: I think constraints lead to interesting, creative solutions […]. Instead of relying on built in elements a bit more, I decided to banish classes from my website completely. Long time readers will know that I'm a big f…