htmlq – Command-line HTML Processor

Similar to how jq allows you to extract content from JSON files on the CLI, htmlq allows you extract content from HTML files. Like jq, but for HTML. Uses CSS selectors to extract bits of content from HTML files. You can pass in a local HTML file, but also pipe it to cURL requests. For …

Highlight columns in HTML tables with <colgroup>

Interesting find by Manuel Matuzovic: The other day I looked up colgroup on MDN […] the demo at the beginning of the page caught my attention. The author adds a class to the col element, which does nothing with the col element itself, at least not visually, because the element doesn’t get rendered on the …

HTML Table with Sticky Header Row and Sticky First Column

Nice work by Chris Coyier: See the Pen Table with Sticky Header and Sticky First Column by Chris Coyier (@chriscoyier) on CodePen. I tried this on a table before and would swear it didn’t work back then. Perhaps I did something wrong, because it’s quite tricky as Chris details: The “trick” at play here is …

“This website is a single HTML file”

This website is a single HTML file. It simply uses the #anchor suffix (from 1992) and the :target CSS selector to show and hide pages/content. This setup is databaseless, javascriptless, and buildshit-free, so you can edit your website with a text editor and upload it somewhere like a normal person. Brilliant! 🤩 John Doe → …

Implement footnotes in HTML with the <ruby> element

Looking for a way to implement footnotes in HTML, Thomas Steiner experimented with using the <ruby> element. The MDN docs describe the ruby element as follows. “The HTML <ruby> element represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters. It can …

Alt vs Figcaption

This message by Elaina Natario writing over at Thoughtbot cannot be repeated enough: While both the alt attribute and the figcaption element provide a way to describe images, the way we write for them is different. alt descriptions should be functional; figcaption descriptions should be editorial or illustrative. Examples of both functional and editorial descriptions …

Using Emoji as the Mouse Cursor on a Webpage

Recently I saw this tweet by Marco Denic fly by: CSS tip: Did you know that you can use your own image, or even emoji as a cursor? pic.twitter.com/P25wSJ0ui6 — Marko ⚡ Denic (@denicmarko) January 6, 2021 To use an emoji as the cursor you can’t simply type in the emoji though. /* ❌ This …

My stack will outlive yours

Steren (who happens to be PM for the wonderful Cloud Run): My stack requires no maintenance, has perfect Lighthouse scores, will never have any security vulnerability, is based on open standards, is portable, has an instant dev loop, has no build step and… will outlive any other stack. It’s not LAMP, WordPress, Rails, MEAN, Jamstack… …