--- id: css-text-spacing title: "CSS Text Spacing" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["text spacing", "text-indent", "letter-spacing", "line-height", "word-spacing", "white-space"] 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", "spacing"] raw_sources: ["https://www.w3schools.com/css/css_text_spacing.asp"] applied_in: [] github_commit: "" --- # [[CSS Text Spacing]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) CSS provides five text-spacing properties β€” `text-indent`, `letter-spacing`, `line-height`, `word-spacing`, and `white-space` β€” to control indentation, character/word/line spacing, and whitespace handling. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`text-indent`** β€” specifies the indentation of the first line in a text-block; negative values are permitted for leftward indentation. [S1] - **`letter-spacing`** β€” specifies the space between the characters in a text; negative values are allowed. [S1] - **`line-height`** β€” specifies the space between lines; negative values are not permitted. [S1] - **`word-spacing`** β€” specifies the space between the words in a text; negative values are allowed. [S1] - **`white-space`** β€” specifies how whitespace inside an element is handled; values include `normal`, `nowrap`, `pre`, `pre-line`, and `pre-wrap`. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **First-line indent pattern** β€” `text-indent: ;` to indent the opening line of a block. [S1] - **Character/word tracking pattern** β€” adjust `letter-spacing` and `word-spacing` (including negative values) to tighten or loosen spacing. [S1] - **Line density pattern** β€” use unitless `line-height` (e.g., `0.8` vs `1.8`) for tighter or looser line spacing. [S1] - **No-wrap pattern** β€” `white-space: nowrap;` to prevent text from wrapping. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) The page discusses five CSS properties for controlling text spacing: `text-indent`, `letter-spacing`, `line-height`, `word-spacing`, and `white-space`. [S1] **Text Indentation** β€” "The CSS `text-indent` property is used to specify the indentation of the first line in a text-block." Negative values are permitted for leftward indentation. [S1] ```css p { text-indent: 50px; } ``` **Letter Spacing** β€” "The CSS `letter-spacing` property is used to specify the space between the characters in a text." Negative values are allowed. [S1] ```css h1 { letter-spacing: 5px; } h2 { letter-spacing: -2px; } ``` **Line Height** β€” "The CSS `line-height` property is used to specify the space between lines." Negative values are not permitted. [S1] ```css p.small { line-height: 0.8; } p.big { line-height: 1.8; } ``` **Word Spacing** β€” "The CSS `word-spacing` property is used to specify the space between the words in a text." Negative values are allowed. [S1] ```css p.one { word-spacing: 10px; } p.two { word-spacing: -2px; } ``` **White Space** β€” "The CSS `white-space` property specifies how white-space inside an element is handled." This property can accept values including `normal`, `nowrap`, `pre`, `pre-line`, and `pre-wrap`. [S1] ```css p { white-space: nowrap; } ``` A summary table on the page lists each property with its description, linking to detailed CSS reference documentation for each spacing attribute. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's own examples are the applied cases: first-line indentation, positive/negative letter spacing, tight vs loose line height, positive/negative word spacing, and a no-wrap whitespace rule. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Spacing properties (language: CSS): ```css selector { text-indent: ; letter-spacing: ; line-height: ; word-spacing: ; white-space: normal | nowrap | pre | pre-line | pre-wrap; } ``` Concrete example: ```css p.big { line-height: 1.8; } ``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (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 Transformation]], [[CSS Text Alignment]], [[CSS Text Decoration]] - **μ°Έμ‘° λ§₯락:** Referenced when tuning the spacing and whitespace handling of textual content. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Text Spacing β€” https://www.w3schools.com/css/css_text_spacing.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Text Spacing" page (Astra wiki-curation, P-Reinforce v3.1 format).