--- id: css-text-effects title: "CSS Text Effects" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["text-overflow", "word-wrap", "word-break", "writing-mode", "CSS text effects"] 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", "text-effects", "text-overflow", "typography"] raw_sources: ["https://www.w3schools.com/css/css3_text_effects.asp"] applied_in: [] github_commit: "" --- # [[CSS Text Effects]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) CSS text-effect properties control how text behaves at its boundaries β€” signaling overflow (`text-overflow`), breaking long words (`word-wrap`/`word-break`), and orienting lines horizontally or vertically (`writing-mode`). [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`text-overflow`** β€” specifies how overflowed content that is not displayed should be signaled to the user. [S1] - **`text-overflow` prerequisites** β€” it relies on `white-space: nowrap;` and `overflow: hidden;` being set. [S1] - **`word-wrap`** β€” allows long words to be broken and wrapped onto the next line. [S1] - **`word-break`** β€” specifies line breaking rules for non-CJK scripts; values include `normal`, `break-all`, and `keep-all`. [S1] - **`writing-mode`** β€” specifies whether lines of text are laid out horizontally or vertically. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Overflow-signal pattern** β€” `white-space: nowrap; overflow: hidden; text-overflow: clip | ellipsis;`. [S1] - **Long-word-wrap pattern** β€” `word-wrap: break-word;` to break unbreakable words. [S1] - **Break-rule pattern** β€” `word-break: break-all;` to break at any character. [S1] - **Orientation pattern** β€” `writing-mode: vertical-rl;` to lay text vertically. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **CSS Text Overflow** [S1] The `text-overflow` property specifies how overflowed content that is not displayed should be signaled to the user. It works with `white-space: nowrap;` and `overflow: hidden;`. Clipped content: ```css p.test1 { width: 200px; border: 1px solid #000000; white-space: nowrap; overflow: hidden; text-overflow: clip; } ``` Ellipsis: ```css p.test2 { width: 200px; border: 1px solid #000000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } ``` **CSS Word Wrapping** [S1] The `word-wrap` property allows long words to be broken and wrapped onto the next line: ```css p { word-wrap: break-word; } ``` **CSS Word Breaking** [S1] The `word-break` property specifies line breaking rules: ```css p.test1 { word-break: normal; } p.test2 { word-break: break-all; } ``` **CSS Writing Mode** [S1] The `writing-mode` property specifies whether lines of text are laid out horizontally or vertically: ```css p.test1 { writing-mode: horizontal-tb; } span { writing-mode: vertical-rl; } p.test2 { writing-mode: vertical-rl; } ``` **CSS Text Effect Properties reference** [S1] The page includes a table listing the text-effect properties: `text-justify`, `text-overflow`, `word-break`, `word-wrap`, and `writing-mode`, each with a brief description of its function. ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's own demonstrations (`p.test1`/`p.test2`, `span`, and `p` elements showing clip/ellipsis overflow, word wrapping, word breaking, and writing modes) serve as the applied examples. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Truncate with ellipsis (language: CSS): ```css p.test2 { width: 200px; border: 1px solid #000000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } ``` Break long words: ```css p { word-wrap: break-word; } ``` Vertical text: ```css span { writing-mode: vertical-rl; } ``` ## βš–οΈ 비ꡐ 및 선택 κΈ°μ€€ (Comparison & decision criteria) - **`text-overflow: clip` vs `ellipsis`** β€” `clip` simply cuts off the overflowed text; `ellipsis` signals the truncation with a "…". Both require `white-space: nowrap;` and `overflow: hidden;`. [S1] - **`word-wrap` vs `word-break`** β€” `word-wrap: break-word` breaks long words only when needed to wrap; `word-break: break-all` breaks between any characters. [S1] - **`writing-mode` horizontal-tb vs vertical-rl** β€” choose `horizontal-tb` for normal horizontal flow and `vertical-rl` for vertically laid-out lines. [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.88 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Text Shadow Effects]], [[CSS Custom Fonts]], [[CSS Box Shadow]] - **μ°Έμ‘° λ§₯락:** Referenced when controlling how text truncates, wraps, breaks, or orients in constrained layouts. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Text Effects β€” https://www.w3schools.com/css/css3_text_effects.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Text Effects" page (Astra wiki-curation, P-Reinforce v3.1 format).