HTML Guides for projection
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
Media types describe the general category of a device for which a stylesheet is intended. The most commonly used values are screen (for computer screens, tablets, and phones), print (for print preview and printed pages), and all (the default, for all devices).
Understanding Deprecated Media Types
CSS 2.1 and Media Queries 3 defined several additional media types: tty, tv, projection, handheld, braille, embossed, and aural. All of these were deprecated in the Media Queries 4 specification. The projection type was originally intended for projected presentations (such as slideshows), but modern browsers never meaningfully distinguished between screen and projection rendering contexts.
Why This Is a Problem
- Standards compliance: Using deprecated media types produces validator warnings and means your code doesn't conform to current web standards.
- No practical effect: Modern browsers treat unrecognized or deprecated media types as not matching, which means a stylesheet targeted only at
projectionwould never be applied. When combined withscreenin a comma-separated list (e.g.,screen,projection), theprojectionportion is simply ignored — it adds clutter without benefit. - Maintainability: Keeping deprecated values in your markup can confuse other developers and suggest that the code targets a platform that no longer exists in the spec.
How to Fix It
- Remove the deprecated media type from the
mediaattribute, keeping only valid types likescreen,print,speech, orall. - Remove the
mediaattribute entirely if the remaining value isallor if you only needscreen(sincescreenis the most common rendering context and stylesheets without amediaattribute default toall). - Use modern media features instead of deprecated media types if you need to target specific device capabilities (e.g.,
(hover: none),(pointer: coarse),(display-mode: fullscreen)).
Examples
❌ Incorrect: Using the deprecated projection media type
<linkrel="stylesheet"href="styles.css"media="screen,projection">
This triggers the validation warning because projection has been deprecated.
✅ Correct: Using only the screen media type
<linkrel="stylesheet"href="styles.css"media="screen">
✅ Correct: Removing the media attribute entirely
If you want the stylesheet to apply to all media types (the default behavior), simply omit the attribute:
<linkrel="stylesheet"href="styles.css">
✅ Correct: Combining valid media types
If you need your stylesheet to apply to both screen and print contexts:
<linkrel="stylesheet"href="styles.css"media="screen,print">
❌ Other deprecated media types to avoid
All of the following are deprecated and will produce similar warnings:
<linkrel="stylesheet"href="a.css"media="handheld">
<linkrel="stylesheet"href="b.css"media="tv">
<linkrel="stylesheet"href="c.css"media="braille">
<linkrel="stylesheet"href="d.css"media="embossed">
<linkrel="stylesheet"href="e.css"media="tty">
<linkrel="stylesheet"href="f.css"media="aural">
Replace these with screen, print, speech, all, or use specific media features to target the device characteristics you need.
The media attribute on a <link> element specifies which media or device types the linked resource (typically a stylesheet) is designed for. It accepts a valid media query or a comma-separated list of media types. In the current CSS specification (Media Queries Level 4), only three media types remain valid: all, screen, and print. All other media types from older specifications — including projection, handheld, tv, tty, braille, embossed, and aural — have been deprecated.
The projection media type was originally intended to target presentation and projector-based displays. In practice, browser support for it was extremely limited (only Opera had meaningful support), and the use case never gained traction. The CSS Working Group deprecated it because the distinction between a "screen" and a "projection" display is no longer meaningful — modern browsers treat projectors, external displays, and monitors uniformly under the screen type.
Why this matters
- Standards compliance: Using deprecated media types causes W3C validation errors, which can signal broader code quality issues.
- No practical effect: Modern browsers simply ignore unrecognized media types. If
projectionis the only value in yourmediaattribute, the stylesheet may not load at all in some browsers. If it appears alongsidescreen, the browser loads the stylesheet based on thescreenmatch and silently discardsprojection— meaning the deprecated value adds nothing. - Maintainability: Keeping deprecated values in your code can confuse other developers and create the false impression that the stylesheet has special behavior for projectors.
How to fix it
- Remove
projectionfrom themediaattribute value. - If
screenor another valid type was already listed alongsideprojection, keep the valid type. - If
projectionwas the only value, replace it withscreen(since projectors are treated as screens by modern browsers). - If the stylesheet should apply universally, remove the
mediaattribute entirely or set it toall.
Examples
Incorrect
Using the deprecated projection media type alongside screen:
<linkrel="stylesheet"href="style.css"media="screen, projection">
Using projection as the sole media type:
<linkrel="stylesheet"href="slides.css"media="projection">
Correct
Remove projection and keep the valid screen type:
<linkrel="stylesheet"href="style.css"media="screen">
Replace projection with screen, since projectors are handled as screens:
<linkrel="stylesheet"href="slides.css"media="screen">
Target both screens and print:
<linkrel="stylesheet"href="style.css"media="screen, print">
If the stylesheet should apply to all devices, omit the media attribute (which defaults to all):
<linkrel="stylesheet"href="style.css">
Or explicitly set it to all:
<linkrel="stylesheet"href="style.css"media="all">
Using media queries instead of media types
If you need more granular control over when a stylesheet applies — for example, targeting large displays commonly used for presentations — you can use a media query with feature conditions instead of relying on deprecated media types:
<linkrel="stylesheet"href="presentation.css"media="screen and (min-width: 1920px)">
This approach is standards-compliant and gives you far more precise targeting than the old media types ever provided.
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
Pro Trial
Full Pro access. Cancel anytime.
Start Pro Trial →Join teams across 40+ countries