HTML Tags

HTML <shadow> Tag

The <shadow> tag in HTML was used in early versions of the Shadow DOM specification to define the shadow tree for an element.
It acted as a placeholder for shadow DOM content, allowing developers to encapsulate styles and markup from the main document.

However, this tag has been deprecated and is no longer supported in modern browsers.
Developers should now use the Shadow DOM API (via JavaScript) instead of the <shadow> tag.

Syntax

<shadow></shadow>

Attributes

AttributeDescriptionValue
NoneThe <shadow> element does not have any specific attributes.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Shadow Tag Example</title>
</head>
<body>
  <h2>HTML &lt;shadow&gt; Tag Example</h2>

  <!-- The shadow tag is deprecated and not functional in modern browsers -->
  <div>
    <shadow>
      <p>This content was meant to appear inside a shadow DOM.</p>
    </shadow>
  </div>

  <p><strong>Note:</strong> The &lt;shadow&gt; element is obsolete and no longer supported.</p>
</body>
</html>

Output

Browser Output

(No visible output — the <shadow> element is ignored by browsers.)

Browser Support

Chrome
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
❌No❌No❌No❌No❌No❌No

Notes

  • The <shadow> tag was part of the early Shadow DOM v0 specification.
  • It is no longer supported and should not be used in any modern HTML document.
  • Instead, use the Shadow DOM v1 API via JavaScript:
const shadow = element.attachShadow({ mode: 'open' });
shadow.innerHTML = `<p>This is inside the shadow DOM.</p>`;
  • The new API provides better encapsulation and is supported in all modern browsers.

Conclusion

The <shadow> element was an experimental HTML feature for defining shadow DOM content, but it is now deprecated.
Developers should use the modern Shadow DOM API for encapsulation of HTML and CSS instead of this tag.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend