Rise Layouts logo Rise LayoutsDesign and layout, explained clearly
Web Design

Link Styling on the Web and Why Underlines Still Win

A studio I helped out last spring had a beautiful article page and a support inbox full of the same question: where do I click to get the price list?

A paragraph of body text on screen with one underlined link shown at close range

A studio I helped out last spring had a beautiful article page and a support inbox full of the same question: where do I click to get the price list? The link was there, in the second paragraph, set in the brand teal with the underline removed because underlines looked untidy next to the custom heading face. On a laptop in a bright room the teal and the near black body text were close enough that most readers scanned straight past it.

Nothing in that page was broken. It validated, the contrast of the text itself was fine, and the designer had followed advice she had read in a dozen places. The failure was that the page asked readers to notice a colour difference while reading, which is the one job colour alone is worst at. Underlines solve it, and the reason most people dislike them is that the browser default is ugly rather than that the idea is wrong.

Colour alone asks too much of the reader

Reading is fast and peripheral. Your eye picks up word shapes a few words ahead of where you are, and a change of hue at the same lightness barely registers in that peripheral pass. A change of shape registers immediately, which is why a line under four words works at a glance and a teal that is 12 percent darker than the body text does not.

Then there is colour vision. Roughly 1 in 12 men and 1 in 200 women see reds and greens differently, and a teal link in dark grey text is a common collision. Those readers are not a rounding error on a site with 5,000 monthly visitors, they are about 200 people, and for them a colour only link is invisible until the cursor happens to pass over it.

Printed pages and apps get away with more because links there are usually standalone buttons or list items. Inline links inside a sentence are the hard case, and that is where I now treat the underline as part of the typography rather than decoration. Contrast helps, but as contrast matters more than colour choice argues, a safe ratio still only tells you text is legible, not that a reader will spot that four words out of thirty do something different.

Five adjustments that make an underline look intentional

The browser default sits too close to the baseline, cuts through descenders, and matches the text weight so it reads as heavy. Modern CSS fixes every one of those, and the properties have been safe in all major browsers since about 2021.

  1. Push the line down. Set text-underline-offset to 0.15em for most sans faces and 0.2em for a serif with long descenders. At 18px body text that is roughly 3px of air, which is the difference between a smudge and a line.
  2. Thin it out. text-decoration-thickness at 1px, or 0.06em if you want it to scale with headings. The default on many faces lands near 2px at body size and shouts.
  3. Let it skip descenders. text-decoration-skip-ink is auto by default in Chrome and Safari, so the line breaks around a g or a y. If you have ever overridden it to none, put it back.
  4. Drop the line colour, keep the text colour. text-decoration-color set to a 40 to 50 percent alpha version of the link colour keeps the word readable while the line stays quiet. This single change converts most of the designers I show it to.
  5. Thicken it on hover instead of adding it. Going from 1px to 2px, or raising the line colour to full opacity, gives feedback without shifting any text. Adding an underline on hover shifts nothing visually until the reader is already there, which is exactly too late.

One more thing, which is not CSS. Keep the link colour the same everywhere on the site. Two different link colours in two sections looks like a bug to a reader who has learned the first one.

The 3:1 exception is not the permission people think it is

Here is the advice I would push back on hardest. Accessibility guidance allows links without underlines if the link colour has a contrast ratio of at least 3:1 against the surrounding text and the link gains a non colour cue on hover and focus. Designers quote the first half of that sentence constantly as proof that underlines are optional.

Read the second half. The hover requirement means the cue arrives only after the reader has found the thing they were trying to find, and on a phone there is no hover at all. Over half of most sites' traffic is touch, and on touch the entire fallback cue does not exist. A rule written for mouse users is being used to justify a pattern that fails for the majority audience.

The ratio itself is also harder to hit than it looks. Against body text at #1a1a1a, a 3:1 link needs to be noticeably lighter or more saturated than most brand palettes allow, and when designers measure it properly they usually land somewhere near 1.8:1 and move on. If you check one number on your site today, make it that one.

Where I do drop underlines, happily: navigation, footer columns, card titles that are wholly clickable, breadcrumbs, and anything styled as a button. In all of those the position, size and surrounding whitespace already say clickable, and underlining them makes a tidy menu look like a list of corrections. The rule I use is one line long. Underline links inside running prose, never outside it.

States, and the one everybody forgets

Hover gets all the attention and matters least. Focus is the state that decides whether someone using a keyboard can move through your page at all, and the default outline is usually the first thing a reset stylesheet kills.

Use focus-visible rather than focus so a mouse click does not leave a ring behind, and give it a 2px outline with a 2px offset in a colour that holds up on both your light and dark backgrounds. The offset is what keeps the ring from hugging the text. A visible focus ring on a link is the same promise a pressed state makes on a control, which button design for beginners covers from the other direction.

Visited links are the other neglected state. Browsers gave us purple for a reason, and on any site with more than about 30 articles it saves readers from reopening something they already read. You do not have to use purple. Use a desaturated version of your link colour, keep the underline, and accept that it will look slightly inconsistent in screenshots. Readers browsing an archive will thank you without ever knowing why.

Finally, write the anchor text as part of the sentence. Read more, click here, and this link all fail for anyone scanning a list of links out of context, and a screen reader user often does exactly that. A link that reads sensibly on its own also tends to sit better in the line, which keeps the measure and the line height you set for body text doing their job instead of fighting a four word blue island.

FAQ

Underline links that sit inside paragraphs and lists of prose. Skip the underline in navigation, footers, buttons and fully clickable cards, where position and size already signal that the element is interactive.

No. Any colour works as long as it holds at least 3:1 contrast against the body text and 4.5:1 against the background, and as long as you use the same one site wide.

What is the best underline offset for body text?

Between 0.12em and 0.2em for most faces, which is about 2 to 4px at an 18px size. Set the thickness to 1px at the same time, or the extra distance just makes the line look detached.

Yes on content sites with a real archive. Browsers limit what CSS can read about visited state for privacy reasons, so stick to colour and decoration changes rather than layout.

ST
Suki Tanaka

Suki covers type and color, translating design theory into practical choices anyone can apply.

More posts by Suki

More in Web Design

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto