--- id: css-google-fonts title: "CSS Google Fonts" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["Google Fonts", "CSS Google Fonts", "web fonts", "font effects", "fonts.googleapis.com"] 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", "fonts", "google-fonts"] raw_sources: ["https://www.w3schools.com/css/css_font_google.asp"] applied_in: [] github_commit: "" --- # [[CSS Google Fonts]] ## π― ν μ€ ν΅μ°° (One-line insight) Google Fonts provides over 1000 free fonts you can use by adding a `` to `fonts.googleapis.com` in the `
` and referencing the font in CSS; multiple fonts are pipe-separated and special `&effect=` parameters apply decorative effects. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **What it is** β Google Fonts offers over 1000 free fonts through Google's font service, as an alternative to standard HTML fonts. [S1] - **Two steps** β add a `` in the `` section, then reference the font in CSS via `font-family`. [S1] - **Multiple fonts** β separate multiple font names in the link URL with the pipe character (`|`). [S1] - **Font effects** β add `&effect=effectname` to the URL and apply the class `font-effect-effectname` to the element. [S1] - **Always use fallbacks** β include a fallback font (serif or sans-serif) to avoid unexpected behavior. [S1] - **Performance** β using multiple fonts may slow page load performance. [S1] ## π§© μΆμΆλ ν¨ν΄ (Extracted patterns) - **Link + reference** β one `` per font set, then `font-family: "Name", generic;` in CSS. [S1] - **Pipe for many** β `?family=Audiowide|Sofia|Trirong` loads several fonts in one request. [S1] - **Effect class pairing** β URL `&effect=fire` pairs with HTML class `font-effect-fire`. [S1] ## π μΈλΆ λ΄μ© (Details) Google Fonts lets you use over 1000 free fonts through Google's font service as an alternative to standard HTML fonts. To use Google Fonts, add a link in the `` section and reference it in CSS. [S1] ```html ``` Then apply it via `font-family: "Sofia", sans-serif;`. [S1] **Sofia font example:** [S1] ```html ``` **Trirong font example:** [S1] ```html ``` **Audiowide font example:** [S1] ```html ``` **Multiple fonts** β separate font names with the pipe character (`|`): [S1] ```html ``` **Font effects** β add `&effect=effectname` to the URL and apply the class `font-effect-effectname`: [S1] ```html