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:
@@ -0,0 +1,120 @@
|
||||
---
|
||||
id: css-text-pseudo-elements
|
||||
title: "CSS Text Pseudo-elements"
|
||||
category: "Frontend"
|
||||
status: "draft"
|
||||
verification_status: "conceptual"
|
||||
canonical_id: ""
|
||||
aliases: ["::first-line", "::first-letter", "text pseudo-elements", "drop cap", "first line styling"]
|
||||
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", "pseudo-elements", "typography"]
|
||||
raw_sources: ["https://www.w3schools.com/css/css_pseudo_elements_text.asp"]
|
||||
applied_in: []
|
||||
github_commit: ""
|
||||
---
|
||||
|
||||
# [[CSS Text Pseudo-elements]]
|
||||
|
||||
## 🎯 한 줄 통찰 (One-line insight)
|
||||
The text pseudo-elements `::first-line` and `::first-letter` style just the opening line or opening letter of block-level text, and can be combined with classes and with each other. [S1]
|
||||
|
||||
## 🧠 핵심 개념 (Core concepts)
|
||||
- **`::first-line`** — styles the first line of text; can only be applied to block-level elements. [S1]
|
||||
- **`::first-letter`** — styles the first letter of text; can only be applied to block-level elements. [S1]
|
||||
- **Works with classes** — pseudo-elements can be combined with HTML classes (e.g. `p.intro::first-letter`). [S1]
|
||||
- **Combinable** — `::first-line` and `::first-letter` can both be applied to the same element. [S1]
|
||||
|
||||
## 🧩 추출된 패턴 (Extracted patterns)
|
||||
- **Drop-cap pattern** — `::first-letter` with an enlarged font size produces a drop-cap-style opening letter. [S1]
|
||||
- **Class-scoped pseudo-element** — `selector.class::first-letter` limits the effect to a specific subset of elements. [S1]
|
||||
- **Stacking pseudo-elements** — applying both `::first-letter` and `::first-line` to one selector layers two styles on the same paragraph. [S1]
|
||||
|
||||
## 📖 세부 내용 (Details)
|
||||
**The `::first-line` pseudo-element** [S1]
|
||||
The `::first-line` pseudo-element is used to style the first line of text. It can only be applied to block-level elements.
|
||||
```css
|
||||
p::first-line {
|
||||
color: red;
|
||||
font-variant: small-caps;
|
||||
font-size: 19px;
|
||||
}
|
||||
```
|
||||
|
||||
**The `::first-letter` pseudo-element** [S1]
|
||||
The `::first-letter` pseudo-element is used to style the first letter of text. Like `::first-line`, it can only be applied to block-level elements.
|
||||
```css
|
||||
p::first-letter {
|
||||
color: red;
|
||||
font-size: xx-large;
|
||||
}
|
||||
```
|
||||
|
||||
**Combining with a class** [S1]
|
||||
Pseudo-elements can be combined with HTML classes:
|
||||
```css
|
||||
p.intro::first-letter {
|
||||
color: #ff0000;
|
||||
font-size: 200%;
|
||||
}
|
||||
```
|
||||
|
||||
**Multiple pseudo-elements on one selector** [S1]
|
||||
Several pseudo-elements can be combined:
|
||||
```css
|
||||
p::first-letter {
|
||||
color: red;
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
p::first-line {
|
||||
color: blue;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
```
|
||||
|
||||
## 🛠️ 적용 사례 (Applied in summary)
|
||||
The page's applied examples are the red small-caps first line, the enlarged red first letter, the `.intro` class drop cap, and the stacked first-letter + first-line styling. No external project/commit applications found in the source.
|
||||
|
||||
## 💻 코드 패턴 (Code patterns)
|
||||
First-line styling (language: CSS):
|
||||
```css
|
||||
p::first-line {
|
||||
color: red;
|
||||
font-variant: small-caps;
|
||||
font-size: 19px;
|
||||
}
|
||||
```
|
||||
Drop-cap first letter (language: CSS):
|
||||
```css
|
||||
p::first-letter {
|
||||
color: red;
|
||||
font-size: xx-large;
|
||||
}
|
||||
```
|
||||
|
||||
## ⚖️ 모순 및 업데이트 (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 Pseudo-elements]], [[CSS Content Pseudo-elements]], [[CSS Text]]
|
||||
- **참조 맥락:** Referenced when styling the opening line or letter of paragraphs, e.g. drop caps.
|
||||
|
||||
## 📚 출처 (Sources)
|
||||
- [S1] W3Schools — CSS Text Pseudo-elements — https://www.w3schools.com/css/css_pseudo_elements_text.asp
|
||||
|
||||
## 📝 변경 이력 (Change history)
|
||||
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Text Pseudo-elements" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||
Reference in New Issue
Block a user