# Font Weight

Set the font weight for an element.

**Widely available.** This feature is well established and works across many devices and browser versions.

Chrome 2 · Edge 12 · Firefox 1 · Safari 1

| Class | Properties | Value |
|-------|------------|-------|
| `fw:100` | font-weight | `100` |
| `fw:200` | font-weight | `200` |
| `fw:300` | font-weight | `300` |
| `fw:400` | font-weight | `400` |
| `fw:500` | font-weight | `500` |
| `fw:600` | font-weight | `600` |
| `fw:700` | font-weight | `700` |
| `fw:800` | font-weight | `800` |
| `fw:900` | font-weight | `900` |

> **Note**
>
> Headings inherit their weight, and `<b>` & `<strong>` are `700`. See
> [Normalization](/docs/normalize#typography).

## Variants

Prefix any class with a variant to apply it only under that condition. Variants stack, as in `@md:h:fw:500`.

### Breakpoints

Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.

| Class | Applies |
|-------|---------|
| `@xs:fw:500` | From 32rem up. |
| `@sm:fw:500` | From 40rem up. |
| `@md:fw:500` | From 48rem up. |
| `@lg:fw:500` | From 64rem up. |
| `@xl:fw:500` | From 80rem up. |
| `@xxl:fw:500` | From 96rem up. |

### Containers

Apply a class from a container's width up, not the viewport's. Mark the parent with `ct:is` first.

| Class | Applies |
|-------|---------|
| `@c:xs:fw:500` | Container from 32rem up. |
| `@c:sm:fw:500` | Container from 40rem up. |
| `@c:md:fw:500` | Container from 48rem up. |
| `@c:lg:fw:500` | Container from 64rem up. |
| `@c:xl:fw:500` | Container from 80rem up. |
| `@c:xxl:fw:500` | Container from 96rem up. |

### Media

Apply a class when the device or the page matches a condition, or on the first frame an element renders.

| Class | Applies |
|-------|---------|
| `@pc:fw:500` | On a touch screen. |
| `@prm:fw:500` | With reduced motion on. |
| `@st:fw:500` | On the first frame. |

### States

Apply a class only while the element is in a state, such as hovered, focused or checked.

| Class | Applies |
|-------|---------|
| `h:fw:500` | On :hover. |
| `f:fw:500` | On :focus. |
| `fv:fw:500` | On :focus-visible. |
| `a:fw:500` | On :active. |
| `d:fw:500` | On :disabled. |
| `fc:fw:500` | On :first-child. |
| `c:fw:500` | On :checked. |
| `e:fw:500` | On :empty. |
| `fw:fw:500` | On :focus-within. |
| `i:fw:500` | On :invalid. |
| `in:fw:500` | On :indeterminate. |
| `lc:fw:500` | On :last-child. |
| `nc:fw:500` | On :nth-child. |
| `r:fw:500` | On :required. |
| `ro:fw:500` | On :read-only. |
| `v:fw:500` | On :valid. |

### Pseudo Elements

Style a part of the element rather than the element itself, such as its placeholder or the selected text.

| Class | Applies |
|-------|---------|
| `a::fw:500` | On ::after. |
| `b::fw:500` | On ::before. |
| `p::fw:500` | On ::placeholder. |
| `s::fw:500` | On ::selection. |