--- id: css-pseudo-elements title: "CSS Pseudo-elements" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["pseudo-elements", "::before", "::after", "::first-line", "::marker", "double-colon selectors"] 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", "pseudo-elements", "selectors"] raw_sources: ["https://www.w3schools.com/css/css_pseudo_elements.asp"] applied_in: [] github_commit: "" --- # [[CSS Pseudo-elements]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of an element β€” the first line, the first letter, inserted content, list markers, selected text, or a dialog backdrop. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Definition** β€” A CSS pseudo-element is a keyword that can be added to a selector, to style a specific part of an element. [S1] - **Double-colon syntax** β€” pseudo-elements are written with `::` after the selector. [S1] - **Two families** β€” text pseudo-elements (`::first-line`, `::first-letter`) and content pseudo-elements (`::before`, `::after`, `::marker`, `::selection`, `::backdrop`). [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Style a part, not the whole** β€” pseudo-elements address sub-parts of an element (a line, a letter, generated content) rather than the element as a whole. [S1] - **Syntax pattern** β€” `selector::pseudo-element-name { CSS properties }`. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **Definition** [S1] A CSS pseudo-element is a keyword that can be added to a selector, to style a specific part of an element. Common uses include: - Styling the first letter or first line of an element - Inserting content before or after an element - Styling list item markers - Styling user-selected portions of an element - Styling the viewbox behind a dialog box **Syntax** [S1] ```css selector::pseudo-element-name { CSS properties } ``` **Text pseudo-elements** [S1] | Pseudo-element | Description | | --- | --- | | `::first-line` | Style the first line of text | | `::first-letter` | Style the first letter of text | **Content pseudo-elements** [S1] | Pseudo-element | Description | | --- | --- | | `::before` | Insert content before an element | | `::after` | Insert content after an element | | `::marker` | Style list item markers | | `::selection` | Style user-selected text | | `::backdrop` | Style dialog backdrop | The source references a complete CSS Pseudo-elements Reference for the full list. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) This page is an overview/index; the detailed applied examples live on the dedicated text and content pseudo-element pages. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Pseudo-element syntax (language: CSS): ```css selector::pseudo-element-name { CSS properties } ``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (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 Text Pseudo-elements]], [[CSS Content Pseudo-elements]], [[CSS Structural Pseudo-classes]] - **μ°Έμ‘° λ§₯락:** The entry point whenever styling a specific part of an element rather than the whole. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Pseudo-elements β€” https://www.w3schools.com/css/css_pseudo_elements.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Pseudo-elements" page (Astra wiki-curation, P-Reinforce v3.1 format).