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>
5.4 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| css-table-borders | CSS Table Borders | Frontend | draft | conceptual |
|
B | 0.89 | 2026-06-23 | 2026-06-23 |
|
|
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
borderproperty is a shorthand property forborder-width,border-style, andborder-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-collapseproperty 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: collapseto the table to merge adjacent cell borders. [S1] - Spaced cells — set
border-collapse: separateand useborder-spacingto control distance between cell borders. [S1] - Outer border only — apply the
borderproperty only to the<table>element (not toth/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]
table, th, td {
border: 1px solid;
}
A border color can be added in the same shorthand: [S1]
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]
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]
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]
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):
table, th, td {
border: 1px solid;
}
table {
border-collapse: collapse;
}
Spaced separate borders:
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).