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…
Continue reading →
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 …
Continue reading →
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…
Continue reading →
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, …
Continue reading →
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…
Continue reading →
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,…
Continue reading →
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…
Continue reading →
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, …
Continue reading →
"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 …
Continue reading →
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 "🥴 …
Continue reading →
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…
Continue reading →
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…
Continue reading →