--- id: w3css-badges title: "W3CSS Badges" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["w3-badge", "UTF-8 badges", "W3.CSS λ°°μ§"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.87 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["w3css", "css-framework", "w3schools", "badges"] raw_sources: ["https://www.w3schools.com/w3css/w3css_badges.asp"] applied_in: [] github_commit: "" --- # [[W3CSS Badges]] ## π― ν μ€ ν΅μ°° (One-line insight) W3.CSS provides exactly ONE badge class (`w3-badge`, circular black by default) and achieves every visual variation β colored, sized, positioned inside buttons/lists/tables β purely through combination with OTHER existing classes (`w3-color`, `w3-size`, `w3-right`, `w3-margin-*`), rather than offering dozens of badge-specific variants. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **`w3-badge`** β the ONLY badge class; circular, black by default. [S1] - **Color via composition** β `w3-badge w3-green`, `w3-badge w3-red`, etc. [S1] - **Size inheritance** β a badge inherits its container's font size by default; `w3-size` classes override it. [S1] - **Right-aligned list badges** β `w3-right` (float) + `w3-margin-right` positions a badge at the end of a list item. [S1] - **UTF-8 Dingbat alternative** β single-digit circled numerals (βΆβ·βΈ...β) via Unicode escapes as a badge-free alternative for simple counters. [S1] ## π μΈλΆ λ΄μ© (Details) - Basic badge: `
Updates 9
`. [S1] - Colored: `News 6
`. [S1] - In a button: ``. [S1] - Right-aligned in a list: `