Steve Fenton


You can subscribe to the html tag micro-feed.

The wrong image seems to be selected from a picture element

This post started as a scratch pad as I was looking at helping a colleague implement WEBP images with a JPG fallback for older browsers. They had an issue in modern browsers because the fallback image was being loaded in all cases. Here’s a code example and demo: <picture> <source height=”500″ width=”500″ src=”webp.webp” type=”image/webp”> <source […]

The CSS sibling selector

There is often a bit of confusion surrounding the CSS sibling selector, or ~ as it is known to its friends. Here is how it works. This CSS translated into English says: If there are is a paragraph next to another paragraph inside a division, make the text red Here is an example HTML snippet […]