A picture of me with my dog Tess next to me looking at me

Native HTML and CSS Features That Replaced JavaScript

Modern HTML and CSS have gained a surprising number of features that cover interactions and layout problems we used to solve with custom scripts or libraries. JavaScript obviously isn’t going anywhere, and there are plenty of things that still require it, but in 2026 I find myself needing it less often for ordinary website interfaces.

I generally prefer native browser features when they solve the problem well enough. They usually mean less code, fewer dependencies, better integration with browser behaviour and less maintenance later.