# FCP

> The FCP (First Contentful Paint) metric measures when the first text or image is rendered on the screen.

## What is First Contentful Paint (FCP) and how do I improve it?

The metric that reports the time when the browser renders the first piece of content from the DOM, such as text or an image. A good value is 1.8 seconds or less.

- Topic: Performance
- Type: concept

## Example

Wrong:

```html
<head>
  <script src="/analytics.js"></script>
</head>
```

Right:

```html
<head>
  <script src="/analytics.js" defer></script>
</head>
```

With `defer`, the script downloads in parallel and runs after parsing, so it no longer blocks the first paint.

## Common mistakes

- Loading a large analytics script synchronously in `<head>`.

## Key points

- Scripts in `<head>` use `defer` or `async` instead of blocking rendering.
- Critical CSS is small and non-critical styles do not block the first paint.
- Web fonts use `font-display` so text shows before the font loads.

## Interview questions

### What is a good FCP score?

1.8 seconds or less is good, and over 3 seconds is poor.

### FCP vs LCP: what is the difference?

FCP marks when the first text or image is painted, while LCP marks when the largest one appears, which is usually the main content.

### Is FCP a Core Web Vital?

No. It is a supporting metric that helps find the cause of a slow LCP.

## Related cards

- [LCP](https://wonderium.dev/web/lcp.md)
- [TTFB](https://wonderium.dev/web/ttfb.md)
- [Core Web Vitals](https://wonderium.dev/web/core-web-vitals.md)
- [Render Tree](https://wonderium.dev/web/render-tree.md)
- [font-display](https://wonderium.dev/css/font-display.md)

---

- Level: [Web Platform](https://wonderium.dev/web.md)
- HTML version: https://wonderium.dev/web/fcp
- Last updated: 2026-11-25
