You need to make this shape:

Let us count the ways.
Using SVG
Inline SVG can certainly do it. No browser support concerns here. Here’s inline <svg>, but it could be an <img> or background-image pointing to an .svg file.
If you’re aiming to use it as a button or something, with content inside it, the inline SVG is a bit cumbersome to work with. You could use <text> inside it or something, but honestly you don’t see that very often, as it has unusual limitations, like it can’t wrap. But if this is more of a design element like an icon or part of a logo, it’s pretty nice, as you have as much design control you have with anything else, and extra stuff like SVG filters available.
Using Masks (with SVG)
Now that we have the SVG file, we could make it a file, and then use that file as a mask.
Making is a fine approach usually; it looks sharp, scales well, and is well-supported. It just comes with some downsides worth thinking about, like how content that might actually render in the masked area will be, well, masked.
You’d have to account for that space with some padding or whatnot.
But beyond that, anything else that renders outside the element is also masked. No outlines, box-shadows, etc. They will all be masked. The button above uses both and you can’t see them.
It’s worth pointing out that while we’re masking here, we do already have the .svg file that we could use as a background-image which would remove these masking restrictions, but it would just be “fake” in that any borders, outlines, shadows, etc wouldn’t actually follow the background shape.
Using clip-path
What makes this shape kind of hard is the curved corners. Otherwise we could use clip-path: polygon() with just four points, and it would be pretty chill. We could still use that with so many points that you can’t tell that it isn’t truly curved, but that’s janky.
Fortunately, we have clip-path: shape() now and shape() is capable of curves. It’s pretty cool.
.tag {
clip-path: shape(
from 9% 10%,
curve to 13% 0% with 10% 0%, /* top-left */
line to 93% 0%,
curve to 98% 20% with 100% 0%, /* top-right */
line to 91% 90%,
curve to 87% 100% with 90% 100%, /* bottom-right */
line to 7% 100%,
curve to 2% 80% with 0% 100%, /* bottom-left */
close
);
}Code language: CSS (css)
There is a fallback in the demo above for an angled tag with no curved corners just for funzies, but support is pretty good.
.tag { /* fallback */ }
@supports (clip-path: shape(from 0 0, line to 1px 1px)) {
.tag { /* progressive enhancement */ }
}Code language: CSS (css)
This clip-path() approach has the same limitations as the mask stuff above. Once you’re clipping, you lose anything outside the clipped path, like borders, outlines, shadows, positioned pseudo elements, etc. Not ideal really.
Using border-shape
I’d say border-shape is a bit of an upgrade from clip-path. It still clips the content inside, but it doesn’t clip the stuff outside. This removes a significant limitation from clipping or masking.
Here’s an example of using border-shape, which has less browser support, but the path is kept in a custom property so we can make a clip-path fallback from the same function value.
In a supporting browser, it means we can render stuff outside of the shape we’re drawing with no problem!

Using skewX
This is the one my brain thought of first. We start with a regular rounded rectangle, then just skew it up!
.tag {
--skew: 19deg;
aspect-ratio: 3;
border-radius: 14px;
transform: skewX(calc(var(--skew) * -1));
}
.tag-content {
/* Skew back the other way so the content stands upright. */
transform: skewX(var(--skew));
}Code language: CSS (css)
We skew the “inside” the opposite amount so it doesn’t look skewed. Classic trick.
This is actually what started it all, because I was trying to replicate this “tag” design for “Audio Fidelity” on these old-school record covers.

I was honestly just screwing around. I don’t know what those tags mean or even really what they say, I just thought it was a interesting challenge to try to do in multiple ways.