--- id: css-background-image title: "CSS Background Image" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["background-image", "background image url", "CSS background image", "image background", "url() background"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "background", "image"] raw_sources: ["https://www.w3schools.com/css/css_background_image.asp"] applied_in: [] github_commit: "" --- # [[CSS Background Image]] ## π― ν μ€ ν΅μ°° (One-line insight) The `background-image` property sets an image as the background of an element, and by default the image is repeated so it covers the entire element. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **background-image** β specifies an image to use as the background of an element. [S1] - **Default tiling** β by default, the image is repeated so it covers the entire element. [S1] - **Image source** β the image is referenced with the `url()` function (e.g. `url("paper.gif")`). [S1] - **Applies to any element** β a background image can be set on the whole page (`body`) or on a specific element such as a paragraph. [S1] - **Readability matters** β when using a background image, use an image that does not disturb the text. [S1] ## π§© μΆμΆλ ν¨ν΄ (Extracted patterns) - **Page-wide vs element-scoped** β set `background-image` on `body` for the entire page, or on a specific selector (e.g. `p`) to scope it to that element. [S1] - **Contrast check** β choose an image that keeps the overlaid text readable; busy images make text "hardly readable." [S1] ## π μΈλΆ λ΄μ© (Details) **Background Image** The `background-image` property specifies an image to use as the background of an element. By default, the image is repeated so it covers the entire element. [S1] The background image for a page can be set like this: [S1] ```css body { background-image: url("paper.gif"); } ``` > Note: When using a background image, use an image that does not disturb the text. The page shows a counter-example where a busy image makes "the text is hardly readable": [S1] ```css body { background-image: url("bgdesert.jpg"); } ``` The background image can also be set for specific elements, like the `
` element: [S1] ```css p { background-image: url("paper.gif"); } ``` The page's property reference table lists `background-image`, described as the property that sets the background image for an element. [S1] ## π οΈ μ μ© μ¬λ‘ (Applied in summary) The CSS rules above are the page's own demonstration examples for `body` and `p`. No external project/commit applications found in the source. ## π» μ½λ ν¨ν΄ (Code patterns) Page background image (language: CSS): ```css body { background-image: url("paper.gif"); } ``` Element-scoped background image: ```css p { background-image: url("paper.gif"); } ``` ## βοΈ λͺ¨μ λ° μ λ°μ΄νΈ (Contradictions & updates) No contradictions found in the source. ## β κ²μ¦ μν λ° μ λ’°λ - **μν:** draft - **κ²μ¦ λ¨κ³:** conceptual (μ€μ μ μ© μ¬λ‘ λ°κ²¬ μ applied/validatedλ‘ μΉκ²© κ°λ₯) - **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body) - **μ λ’° μ μ:** 0.88 - **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery) ## π μ§μ κ·Έλν (Knowledge Graph) - **μμ/루νΈ:** [[CSS Tutorial]] - **κ΄λ ¨ κ°λ :** [[CSS Background Repeat]], [[CSS Background Attachment]], [[CSS Background Shorthand]], [[CSS Background Color]] - **μ°Έμ‘° λ§₯λ½:** Referenced whenever an image is placed behind page or element content; pairs with background-repeat and background-position to control its tiling and placement. ## π μΆμ² (Sources) - [S1] W3Schools β CSS Background Image β https://www.w3schools.com/css/css_background_image.asp ## π λ³κ²½ μ΄λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Background Image" page (Astra wiki-curation, P-Reinforce v3.1 format).