--- id: w3css-alerts title: "W3CSS Alerts" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["alert boxes", "× close button", "W3.CSS μλ¦Ό"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["w3css", "css-framework", "w3schools", "alerts"] raw_sources: ["https://www.w3schools.com/w3css/w3css_alerts.asp"] applied_in: [] github_commit: "" --- # [[W3CSS Alerts]] ## π― ν μ€ ν΅μ°° (One-line insight) The source explicitly prefers the `×` HTML entity over the literal letter "X" for close buttons β a small but deliberate detail, since `×` renders as a proper multiplication-style cross symbol rather than relying on the letter X looking "close enough," making the close affordance visually distinct from actual text content. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **No dedicated alert class** β alerts are `w3-panel` + a STRONG (saturated) color, contrasted against Notes' PALE colors. [S1] - **Semantic color convention** β red (danger), yellow (warning), green (success), blue (information) β though any color can technically be used. [S1] - **Dismissible via inline `onclick`** β `this.parentElement.style.display='none'` on a `w3-button w3-display-topright` span containing `×`. [S1] - **`×` preferred over literal "X"** β explicitly recommended as the standard close-icon character. [S1] - **Composable with rounding and cards** β `w3-round`/`w3-round-large`/`w3-round-xxlarge` or `w3-card-4` can be layered onto an alert panel. [S1] ## π μΈλΆ λ΄μ© (Details) - Strong-color alert (Danger): `
Red often indicates a dangerous or negative situation.
Red often indicates a dangerous or negative situation.