--- id: css-font-family title: "CSS Font Family" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["font-family", "CSS fonts", "generic font family", "font fallback", "typeface CSS"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.89 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "fonts", "typography"] raw_sources: ["https://www.w3schools.com/css/css_font.asp"] applied_in: [] github_commit: "" --- # [[CSS Font Family]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The `font-family` property sets the typeface for text and should list several comma-separated font names as a fallback system, always ending with a generic family so the browser can pick the best available font. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Font selection matters** β€” choosing the right font has a huge impact on how readers experience a website; pick fonts that are easy to read with appropriate colors and sizes. [S1] - **`font-family` property** β€” specifies the font(s) for an element. [S1] - **Fallback system** β€” `font-family` should contain multiple font names so the browser can fall back if a font is unavailable. [S1] - **Comma-separated** β€” font names are separated by commas. [S1] - **Quote multi-word names** β€” font names made of more than one word require quotation marks. [S1] - **End with a generic family** β€” always end the list with a generic font family. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Fallback stack** β€” list specific fonts first, then progressively safer ones, ending in a generic family: `"Times New Roman", Times, serif`. [S1] - **Generic family classification** β€” group typefaces into five generic families: serif, sans-serif, monospace, cursive, fantasy. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **Font Selection is Important** β€” Choosing the right font has a huge impact on how the readers experience a website. The page stresses selecting fonts that are easy to read with appropriate colors and sizes. [S1] **The CSS `font-family` Property** β€” The `font-family` property specifies the font for an element. It should contain multiple font names as a "fallback" system: if the browser does not support the first font, it tries the next one. Font names are separated by commas, multi-word font names require quotation marks, and the list should always end with a generic family. [S1] Example with three fallback stacks: [S1] ```css .p1 { font-family: "Times New Roman", Times, serif; } .p2 { font-family: Arial, Helvetica, sans-serif; } .p3 { font-family: "Lucida Console", "Courier New", monospace; } ``` **CSS Generic Font Families** β€” five categories are listed: [S1] 1. **Serif** fonts β€” formal and elegant. 2. **Sans-serif** fonts β€” modern and minimalistic. 3. **Monospace** fonts β€” mechanical appearance. 4. **Cursive** fonts β€” imitate handwriting. 5. **Fantasy** fonts β€” decorative / playful. **Font examples by generic family:** [S1] | Generic Family | Examples | |---|---| | Serif | Times New Roman, Georgia, Garamond | | Sans-serif | Arial, Verdana, Helvetica | | Monospace | Courier New, Lucida Console, Monaco | | Cursive | Brush Script MT, Lucida Handwriting | | Fantasy | Copperplate, Papyrus | **Note:** Sans-serif fonts are considered easier to read than serif fonts on computer screens. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's example applies three different fallback stacks to three paragraph classes (`.p1`, `.p2`, `.p3`), each anchored by a different generic family (serif, sans-serif, monospace). No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Fallback stack pattern (language: CSS): ```css selector { font-family: "Specific Font", FallbackFont, generic-family; } ``` Concrete example: ```css .p2 { font-family: Arial, Helvetica, sans-serif; } ``` ## βš–οΈ 비ꡐ 및 선택 κΈ°μ€€ (Comparison & decision criteria) The five generic families serve different stylistic intents: serif (formal/elegant), sans-serif (modern/minimalistic), monospace (mechanical, fixed-width), cursive (handwriting imitation), and fantasy (decorative/playful). Per the source note, sans-serif fonts are considered easier to read than serif fonts on screens, which guides the choice for body text on the web. [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.89 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Web Safe Fonts]], [[CSS Font Fallbacks]], [[CSS Font Style]], [[CSS Font Size]] - **μ°Έμ‘° λ§₯락:** The foundational property referenced whenever specifying which typeface text should use. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Font Family β€” https://www.w3schools.com/css/css_font.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Font Family" page (Astra wiki-curation, P-Reinforce v3.1 format).