Chris Coyier on

The HTML, CSS, and SVG for a Classic Search Form

Let’s build a search form that looks like this: That feels like the absolute bowl-it-down-the-middle search form right now. Looks good but nothing fancy. And yet, coding it in HTML and CSS I don’t think is perfectly intuitive and makes use of a handful of decently modern and slightly lesser used features. The Label-Wrapping HTML […]

Chris Coyier on

Arguments for opening links in a new tab or window

I feel like I’ve always been in the minority on this: I don’t think you should use target=”_blank” on links. Unless you have a very good reason, that is, like there is currently-playing media that would stop, or a user has unsaved work you don’t want to interrupt. But I find that most people disagree, […]

Chris Coyier on

Streaming HTML

I admit I went pretty far in my web development career without understanding that Streamed HTML is a thing. And while I’m admitting things, I’m still not 100% sure when it’s an ideal solution and how best to take advantage of it. But knowing is half the battle sometimes, so let me get into some […]

Dave Rupert on

Safari Gets a Toggle Switch Input

Safari 17.4 dropped an interesting an unexpected feature, a native UI toggle switch control! It’s so new it’s not even in the HTML spec yet. While that might be a blocker for your project, you can use it today as a progressive enhancement on top of the standard <input type=”checkbox”>. Adding a switch attribute to […]

Dave Rupert on

Capo.js: A five minute web performance boost

You want a quick web performance win at work that’s sure to get you a promotion? Want it to only take five minutes? Then I got you. Capo.js is a tool to get your <head> in order. It’s based on some research by Harry Roberts that shows how something seemingly insignificant as the elements in […]

Chris Coyier on

Building a TODO App from Scratch — Step 2 — HTML

OK it’s HTML time! I love HTML time. We’re laying down a foundation that makes everything feel very real. Is HTML jumping the gun? Nah. The reason that we can jump to HTML right away is that it is common to any other future choice we make. As I mentioned, we might just stay in […]

Chris Coyier on

Basic Dialog Usage and Gotchas To Watch For

The <dialog> element in HTML is tremendous. We’ve got support across the board now, so using it is a smart plan. Just with basic usage, you get a centered modal dialog experience that comes up when you call it, a dimmed background, focus trapped within it, closes with the ESC key, and focus returning where […]