CSS text-decoration Playground

Mr. Harun’s shop banner with a link and a BARU badge: set the text-decoration longhands or swap in a border or gradient, measure the real baseline, then find…

Why it matters

A tidy link underline (brand colour, a little offset) reads better, wavy marks misspellings, line-through strikes prices. Knowing the longhands means no border-bottom hacks, and knowing why a link’s child still gets the line.

The key idea

The line is drawn from the letters, and belongs to the element that declared it

Common mistakes

Try it in this playground