Copied!
Guide

How to copy a website's text styles as CSS

The font name is one of five values that make text look the way it does. Here is how to read all of them from any page, and how to turn the pixel numbers into CSS you can reuse.

← Blog
Title card: Text styles as CSS. A lime card shows the letters Aa and a CSS font rule.

December 3, 2026

3 min readWith the conversions worked out

To copy a website's text style you need five values, not one: the font family, the weight, the size, the line height and the letter spacing. All five are in the Computed tab of DevTools for any text you inspect. They come out in pixels, so two of them need a small sum before they are reusable CSS.

The one-click way. The free Font Finder extension for Chrome lists the fonts a page really draws, with the weights and sizes each is used at, and copies ready-to-paste CSS: family, weight, size, line-height and letter-spacing.

Try it on any site. The free website font finder shows you every font a page is set in, with weights and fallbacks. Paste a URL, no sign-up for your first lookup.

How do I read the five values?

  1. Right-click the text and choose Inspect.
  2. Open the Computed tab and type font in its filter box.
  3. Note font-family, font-weight and font-size.
  4. Change the filter to line for line-height, then letter for letter-spacing.
  5. Scroll to Rendered Fonts at the bottom to confirm which font in the family list was really drawn.

How do I turn the pixel values into good CSS?

Say the Computed tab shows a heading at font-size: 48px, line-height: 52.8px and letter-spacing: -0.96px.

ValueComputedSumWrite this
Line height52.8px52.8 ÷ 48line-height: 1.1
Letter spacing-0.96px-0.96 ÷ 48letter-spacing: -0.02em
Font size48px48 ÷ 16font-size: 3rem

Ratios matter because they still work when the size changes. A line height fixed at 52.8 pixels breaks the moment the heading shrinks on a phone. A line height of 1.1 does not.

h1 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

Why does the size change when I resize the window?

Many sites set type with clamp() or viewport units so it grows with the window. The Computed tab only shows the answer at your current width. To copy the behaviour, find the rule in the Styles tab, or measure the size at a phone width and at a desktop width and write your own clamp() between the two.

What else can change how text looks?

How do I get every text style on a page?

A page has a scale: a handful of sizes used again and again. Reading them one element at a time is slow. The design token extractor reads the type scale, colors and spacing of a rendered page in one go, and this guide turns the result into a Tailwind theme.

Where to go next

FAQ

How do I find the font size on a website?

Right-click the text, choose Inspect, open the Computed tab and read font-size. The value is in pixels at your current window width. Many sites scale type with the window, so check again at a phone width.

How do I find the line height and letter spacing of text on a website?

They are in the same Computed tab as line-height and letter-spacing. Both appear in pixels. Divide each by the font size to get the ratio the designer most likely set.

Why does my text look different with the same font and size?

Usually the weight, line height or letter spacing differs. Large headings often have tight line height and slightly negative letter spacing; without those the same font looks loose.

How do I copy the CSS of text from a website?

In DevTools, right-click the element in the Elements panel and choose Copy, then Copy styles. That copies every rule on the element, so you will need to trim it. A font finder extension that copies only the five type values is quicker.

What does a font size with clamp() mean?

clamp(min, preferred, max) lets the size grow with the window between two limits. The Computed tab shows only the result at your current width; the rule itself is in the Styles tab.