docs(10_Wiki): W3Schools 위키화 — HTML/CSS/JavaScript(core)

W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더).
- Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외)
- Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체)
- Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속)
각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-23 19:21:18 +09:00
parent 8957890d13
commit 9609c04755
379 changed files with 54618 additions and 6 deletions
+126
View File
@@ -0,0 +1,126 @@
---
id: css-table-borders
title: "CSS Table Borders"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["table borders", "border-collapse", "border-spacing", "CSS tables", "table styling", "collapse borders"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.89
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["css", "web", "frontend", "w3schools", "tables", "borders"]
raw_sources: ["https://www.w3schools.com/css/css_table.asp"]
applied_in: []
github_commit: ""
---
# [[CSS Table Borders]]
## 🎯 한 줄 통찰 (One-line insight)
Adding borders to `table`, `th`, and `td` separately produces double borders by default; `border-collapse: collapse` merges them into a single border, while `border-spacing` (only with `separate`) controls the gap between separated cell borders. [S1]
## 🧠 핵심 개념 (Core concepts)
- **Border shorthand** — the CSS `border` property is a shorthand property for `border-width`, `border-style`, and `border-color`. [S1]
- **Double borders by default** — because the `<table>`, `<th>`, and `<td>` elements have separate borders, applying borders to all of them yields double borders. [S1]
- **Collapsing** — the `border-collapse` property sets whether table borders should collapse into a single border or be separated as in standard HTML. [S1]
## 🧩 추출된 패턴 (Extracted patterns)
- **Single-border table** — apply `border-collapse: collapse` to the table to merge adjacent cell borders. [S1]
- **Spaced cells** — set `border-collapse: separate` and use `border-spacing` to control distance between cell borders. [S1]
- **Outer border only** — apply the `border` property only to the `<table>` element (not to `th`/`td`) to draw a border around just the table. [S1]
## 📖 세부 내용 (Details)
**Table Borders** — to add borders to a table, use the CSS `border` property. The CSS `border` property is a shorthand property for `border-width`, `border-style`, and `border-color`. The example below specifies a black border for `<table>`, `<th>`, and `<td>` elements: [S1]
```css
table, th, td {
border: 1px solid;
}
```
A border color can be added in the same shorthand: [S1]
```css
table, th, td {
border: 1px solid green;
}
```
**Collapse Table Borders** — the tables above have double borders. This is because both the `<table>`, `<th>`, and `<td>` elements have separate borders. To remove double borders, use the `border-collapse` property: [S1]
```css
table {
border-collapse: collapse;
}
```
The `border-collapse` property can have one of the following values: [S1]
| Value | Description |
|-------|-------------|
| `separate` | Default value. Borders are separated; each cell will display its own borders |
| `collapse` | Borders are collapsed into a single border when possible |
**Border Spacing** — the `border-spacing` property sets the distance between the borders of adjacent cells. This property works only when `border-collapse` is set to `separate`: [S1]
```css
table {
border-collapse: separate;
border-spacing: 15px;
}
```
**Borders Around the Table Only** — if you only want a border around the table, the `border` property should only be specified for the `<table>` element: [S1]
```css
table {
border: 1px solid;
}
```
Dotted/styled or rounded border examples: "Not found in source" within the borders portion of this page. [S1]
## 🛠️ 적용 사례 (Applied in summary)
The page's own examples apply borders to `table`/`th`/`td`, collapse them with `border-collapse: collapse`, add spacing with `border-spacing`, and draw a border around the table only. No external project/commit applications found in the source.
## 💻 코드 패턴 (Code patterns)
Single (collapsed) border table (language: CSS):
```css
table, th, td {
border: 1px solid;
}
table {
border-collapse: collapse;
}
```
Spaced separate borders:
```css
table {
border-collapse: separate;
border-spacing: 15px;
}
```
## ⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
The page contrasts the two `border-collapse` values. **`separate`** (the default) keeps each cell's borders independent and is the only mode in which `border-spacing` has any effect — choose it when you want visible gaps between cells. **`collapse`** merges adjacent borders into a single line — choose it to eliminate the default double-border appearance. The decision is whether spaced, individually-bordered cells or a single clean grid line is desired. [S1]
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source.
## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.89
- **중복 검사 결과:** 신규 생성 (New discovery)
## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[CSS Tutorial]]
- **관련 개념:** [[CSS Styling Lists]], [[CSS Styling Links]], [[CSS Font Shorthand]]
- **참조 맥락:** Referenced when applying and collapsing borders on HTML tables.
## 📚 출처 (Sources)
- [S1] W3Schools — CSS Table Borders — https://www.w3schools.com/css/css_table.asp
## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Table Borders" page (Astra wiki-curation, P-Reinforce v3.1 format).