---
id: css-pagination
title: "CSS Pagination"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["pagination", "page navigation", "pager", "active page", "disabled page link", "page numbers"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.88
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["css", "web", "frontend", "w3schools", "pagination", "navigation", "flexbox"]
raw_sources: ["https://www.w3schools.com/css/css3_pagination.asp"]
applied_in: []
github_commit: ""
---

# [[CSS Pagination]]

## 🎯 한 줄 통찰 (One-line insight)
Pagination is a series of page-number links wrapped in an unordered list, laid out horizontally with flexbox, and decorated with `.active` and `.disabled` state classes to show the current page and dead-end controls. [S1]

## 🧠 핵심 개념 (Core concepts)
- **What it is** — if a website has lots of pages, pagination is typically a series of links wrapped in an unordered list (`<ul>`), where each link represents an individual page number, plus "previous" and "next" controls. [S1]
- **Layout via flex** — the `.pagination` container uses `display: flex;` to arrange the page numbers horizontally and `justify-content: center;` to center-align them. [S1]
- **Strip list styling** — `list-style: none;` removes the bullets so the links read as a row of buttons. [S1]
- **State classes** — an `.active` class marks the current page; a `.disabled` class greys out and deactivates a control (e.g. "Next" on the last page). [S1]

## 🧩 추출된 패턴 (Extracted patterns)
- **List-as-bar pattern** — `<ul class="pagination">` with `display: flex` + `list-style: none` turns a semantic list into a horizontal pager. [S1]
- **Block links for clickable area** — the `<a>` elements use `display: block;` plus padding so the whole cell is clickable, not just the text. [S1]
- **Disable interaction fully** — a disabled link combines visual greying (`color`), `cursor: not-allowed;`, and `pointer-events: none;` to stop clicks. [S1]

## 📖 세부 내용 (Details)
**Introduction** [S1]
If you have a website with lots of pages, you may want to add some sort of pagination on each page. Pagination is typically a series of links, wrapped in an unordered list (`<ul>`). Each link represents an individual page number. In addition there are "previous" and "next" controls. The page shows a visual example: « 1 2 3 4 5 ».

**A simple pagination** [S1]
Style the pagination container with `display: flex;` to arrange the page numbers horizontally, `justify-content: center;` to center-align them, and `list-style: none;` to remove the list bullets. Then style the `<a>` elements within the `<li>` elements for the look of the page numbers:
```css
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0px;
}

.pagination li a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid gray;
  color: black;
  margin: 0 4px;
  border-radius: 5px;
}
```

**Pagination With an Active Class** [S1]
Highlight the currently active page with an `.active` class, to indicate which page the user is on:
```css
.pagination li a.active {
  background-color: #4CAF50;
  color: white;
}
```

**Pagination With a Disabled Class** [S1]
If the user is currently on the last page, the "Next" button should be disabled. Here, we add a `.disabled` class, and set the `color`, `cursor` and `pointer-events` properties:
```css
.pagination li a.disabled {
  color: #dddddd;
  cursor: not-allowed;
  pointer-events: none;
}
```

**Pagination Subpages** [S1]
The page links to a continuation: Pagination Styles — hover effects, transitions, breadcrumbs.

## 🛠️ 적용 사례 (Applied in summary)
The page's examples are the applied cases: a centered flex `.pagination` list, an `.active` state for the current page, and a `.disabled` state for an unavailable "Next" control. No external project/commit applications found in the source.

## 💻 코드 패턴 (Code patterns)
Pagination container + links (language: CSS):
```css
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0px;
}

.pagination li a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid gray;
  color: black;
  margin: 0 4px;
  border-radius: 5px;
}
```
Active page (language: CSS):
```css
.pagination li a.active {
  background-color: #4CAF50;
  color: white;
}
```
Disabled control (language: CSS):
```css
.pagination li a.disabled {
  color: #dddddd;
  cursor: not-allowed;
  pointer-events: none;
}
```

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source.

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.88
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[CSS Tutorial]]
- **관련 개념:** [[CSS Pagination Styles]], [[CSS Navigation Bar]], [[CSS Buttons]], [[CSS Flexbox]]
- **참조 맥락:** Referenced when building page-number navigation for multi-page content listings.

## 📚 출처 (Sources)
- [S1] W3Schools — CSS Pagination — https://www.w3schools.com/css/css3_pagination.asp

## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Pagination" page (Astra wiki-curation, P-Reinforce v3.1 format).
