--- id: html-css title: "HTML CSS" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["CSS in HTML", "inline CSS", "internal CSS", "external CSS", "Cascading Style Sheets", "HTML styles"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.90 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["html", "web", "frontend", "w3schools", "css", "styling"] raw_sources: ["https://www.w3schools.com/html/html_css.asp"] applied_in: [] github_commit: "" --- # [[HTML CSS]] ## π― ν μ€ ν΅μ°° (One-line insight) CSS (Cascading Style Sheets) formats the layout of a web page and can be applied to HTML in three ways β inline (`style` attribute), internal (`` inside `
` styles the whole document. [S1] - **External pattern** β `` references a shared stylesheet. [S1] - **Box-model pattern** β `border` + `padding` + `margin` control an element's framing and spacing. [S1] - **Reference-path pattern** β external `href` can be a full URL, a root-relative path, or a same-folder filename. [S1] ## π μΈλΆ λ΄μ© (Details) **What is CSS?** Cascading Style Sheets (CSS) is used to format the layout of a webpage. With CSS, you can control the color, font, the size of text, the spacing between elements, how elements are positioned and laid out, what background images or background colors are to be used, different displays for different devices and screen sizes, and much more. The cascading concept means a style applied to a parent element will also apply to all children elements within the parent. [S1] **Three ways to add CSS** [S1] - **Inline** β using the `style` attribute on HTML elements - **Internal** β using a `This is a paragraph.