--- url: "https://www.w3.org/WAI/WCAG22/Techniques/css/C9" titulek: "C9: Using CSS to include decorative images | WAI | W3C" h1: "Technique C9:Using CSS to include decorative images" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 03:50:08" znaku: 2340 slov: 346 kodovani: "utf-8" sha256: "b6cf08c627f58c7ec2d0ffd701a108e6a9bb51c9ca3a48627f2c287bf50e502a" --- # Technique C9:Using CSS to include decorative images ## About this Technique This technique relates to [1.1.1 Non-text Content](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content) (**Sufficient**). This technique applies to any technology that can use CSS to include images. Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The objective of this technique is to provide a mechanism to add purely decorative images and images used for visual formatting to web content without requiring additional markup within the content. This makes it possible for assistive technologies to ignore the non-text content. Some user agents can ignore or turn off CSS at the user's request, so that background images included with CSS simply "disappear" and do not interfere with display settings such as enlarged fonts or high contrast settings. Background images can be included with the following CSS properties: - `background` ; - `background-image` ; - `content` , combined with the `::before` and `::after` pseudo-elements; - `list-style-image` . Note This technique is not appropriate for any image that conveys information or provides functionality, or for any image primarily intended to create a specific sensory experience. ## Examples ### Example 1: Background image for an HTML page The stylesheet for a web page specifies a background image for the whole page. ``` ``` ### Example 2: Background image with CSS for image rollovers The stylesheet for a web page uses the CSS background property to create a decorative rollover effects when a user hovers their mouse pointer over a link. ``` a:hover { background: #ffe url('/images/hover.gif') repeat; color: #000; text-decoration: none; } ``` ## Related Resources *No endorsement implied.* - The [`background` property in the CSS specification](https://www.w3.org/TR/css-backgrounds-3/#propdef-background) . ## Tests ### Procedure 1. Check for the presence of decorative images 2. Check that they are included with CSS ### Expected Results - If #1 is true, then #2 is true. Back to Top