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
+122
View File
@@ -0,0 +1,122 @@
---
id: css-inheritance
title: "CSS Inheritance"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["CSS inheritance", "inherited properties", "non-inherited properties", "inherit keyword", "property inheritance"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.87
created_at: 2026-06-23
updated_at: 2026-06-23
review_reason: ""
merge_history: []
tags: ["css", "web", "frontend", "w3schools", "inheritance", "cascade"]
raw_sources: ["https://www.w3schools.com/css/css_inheritance.asp"]
applied_in: []
github_commit: ""
---
# [[CSS Inheritance]]
## 🎯 한 줄 통찰 (One-line insight)
CSS inheritance governs what happens when no value is specified for a property on an element: some properties (typically text-related) inherit their parent's value, others (box-model/layout) do not, and the `inherit` keyword forces inheritance explicitly on either kind. [S1]
## 🧠 핵심 개념 (Core concepts)
- **What inheritance is** — CSS inheritance is about what happens if no value is specified for a property on an element; values either inherit from parent elements or default to initial values. [S1]
- **Inherited properties** — text-related properties like `color`, `font-family`, `font-size`, `line-height`, and `text-align` are typically inherited, ensuring consistent styling throughout a document. [S1]
- **Non-inherited properties** — box-model/layout properties like `border`, `background`, `margin`, `padding`, `width`, and `height` typically do not inherit. [S1]
- **`inherit` keyword** — used to explicitly specify inheritance; it works on both inherited and non-inherited properties. [S1]
## 🧩 추출된 패턴 (Extracted patterns)
- **Rely on inheritance for typography** — set text properties on a container and let descendants inherit them rather than repeating declarations. [S1]
- **Force inheritance with `inherit`** — when a non-inheriting property (like `border`) should match the parent, set it explicitly to `inherit`. [S1]
## 📖 세부 내용 (Details)
**CSS Inheritance**
CSS inheritance is about what happens if no value is specified for a property on an element. The value either inherits from parent elements or defaults to initial values. [S1]
**Inherited Properties**
Text-related properties such as `color`, `font-family`, `font-size`, `line-height`, and `text-align` are typically inherited so styling stays consistent throughout the document. A `<p>` element with `color: blue` and `font-size: 20px` passes these values to a nested `<strong>` element: [S1]
```css
p {
color: blue;
font-size: 20px;
}
```
```html
<p>This is a paragraph with some <strong>important</strong> text.</p>
```
**Non-inherited Properties**
Properties related to the box model and layout — `border`, `background`, `margin`, `padding`, `width`, `height` — typically do not inherit. A `<strong>` element inside a bordered `<p>` will not inherit the border unless explicitly stated: [S1]
```css
p {
border: 1px solid red;
}
```
```html
<p>This is a paragraph with some <strong>important</strong> text.</p>
```
**The inherit Keyword**
The `inherit` keyword is used to explicitly specify inheritance. It works on both inherited and non-inherited properties. Setting `border: inherit` on a `<strong>` element makes it inherit the parent's border value: [S1]
```css
p {
border: 1px solid red;
}
strong {
border: inherit;
}
```
```html
<p>This is a paragraph with some <strong>strong</strong> text.</p>
```
The `initial`, `unset`, and `revert` keywords, and the `all` property, are: Not found in source. [S1]
## 🛠️ 적용 사례 (Applied in summary)
The page's applied cases are: a paragraph passing `color`/`font-size` to a nested `<strong>`, a bordered paragraph whose `<strong>` does not inherit the border, and a `<strong>` forced to take the parent's border via `border: inherit`. No external project/commit applications found in the source.
## 💻 코드 패턴 (Code patterns)
Inherited text styling (language: CSS):
```css
p {
color: blue;
font-size: 20px;
}
```
Force a non-inherited property to inherit (language: CSS):
```css
strong {
border: inherit;
}
```
## ⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
- **Inherited properties** (e.g., `color`, `font-family`, `font-size`, `line-height`, `text-align`) — descendants take the parent's value automatically; rely on this for consistent typography. [S1]
- **Non-inherited properties** (e.g., `border`, `background`, `margin`, `padding`, `width`, `height`) — descendants do not take the parent's value; use the `inherit` keyword when you explicitly want them to. [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.87
- **중복 검사 결과:** 신규 생성 (New discovery)
## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[CSS Tutorial]]
- **관련 개념:** [[CSS Specificity]], [[CSS Cascade]], [[CSS Selectors]]
- **참조 맥락:** Referenced when reasoning about why descendant elements pick up (or do not pick up) styles from their ancestors.
## 📚 출처 (Sources)
- [S1] W3Schools — CSS Inheritance — https://www.w3schools.com/css/css_inheritance.asp
## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Inheritance" page (Astra wiki-curation, P-Reinforce v3.1 format).