• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. HTML: HyperText Markup Language
  3. Global attributes
  4. slot
  • Change language

Table of contents

  • Specifications
  • Browser compatibility
  • See also

slot

The slot global attribute assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is assigned to the slot created by the <slot> element whose name attribute's value matches that slot attribute's value.

For examples, see our Using templates and slots guide.

Specifications

Specification
HTML Standard
# attr-slot
DOM Standard
# ref-for-dom-element-slot①

Browser compatibility

BCD tables only load in the browser

See also

  • All global attributes.

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Oct 3, 2021, by MDN contributors

Change your language

Related Topics

  1. HTML
  2. Tutorials:
  3. HTML basics
  4. Introduction to HTML
    1. Introduction to HTML overview
    2. Getting started with HTML
    3. What's in the head? Metadata in HTML
    4. HTML text fundamentals
    5. Creating hyperlinks
    6. Advanced text formatting
    7. Document and website structure
    8. Debugging HTML
    9. Assessment: Marking up a letter
    10. Assessment: Structuring a page of content
  5. Multimedia and embedding
    1. Multimedia and embedding overview
    2. Images in HTML
    3. Video and audio content
    4. From object to iframe — other embedding technologies
    5. Adding vector graphics to the Web
    6. Responsive images
    7. Assessment: Mozilla splash page
  6. References:
  7. HTML elements
    1. <a>
    2. <abbr>
    3. <acronym>
    4. <address>
    5. <applet>
    6. <area>
    7. <article>
    8. <aside>
    9. <audio>
    10. <b>
    11. <base>
    12. <basefont>
    13. <bdi>
    14. <bdo>
    15. <bgsound>
    16. <big>
    17. <blink>
    18. <blockquote>
    19. <body>
    20. <br>
    21. <button>
    22. <canvas>
    23. <caption>
    24. <center>
    25. <cite>
    26. <code>
    27. <col>
    28. <colgroup>
    29. <content>
    30. <data>
    31. <datalist>
    32. <dd>
    33. <del>
    34. <details>
    35. <dfn>
    36. <dialog>
    37. <dir>
    38. <div>
    39. <dl>
    40. <dt>
    41. <em>
    42. <embed>
    43. <fieldset>
    44. <figcaption>
    45. <figure>
    46. <font>
    47. <footer>
    48. <form>
    49. <frame>
    50. <frameset>
    51. <head>
    52. <header>
    53. <h1>
    54. <hgroup>
    55. <hr>
    56. <html>
    57. <i>
    58. <iframe>
    59. <image>
    60. <img>
    61. <input>
    62. <ins>
    63. <kbd>
    64. <keygen>
    65. <label>
    66. <legend>
    67. <li>
    68. <link>
    69. <main>
    70. <map>
    71. <mark>
    72. <marquee>
    73. <menu>
    74. <menuitem>
    75. <meta>
    76. <meter>
    77. <nav>
    78. <nobr>
    79. <noembed>
    80. <noframes>
    81. <noscript>
    82. <object>
    83. <ol>
    84. <optgroup>
    85. <option>
    86. <output>
    87. <p>
    88. <param>
    89. <picture>
    90. <plaintext>
    91. <portal>
    92. <pre>
    93. <progress>
    94. <q>
    95. <rb>
    96. <rp>
    97. <rt>
    98. <rtc>
    99. <ruby>
    100. <s>
    101. <samp>
    102. <script>
    103. <section>
    104. <select>
    105. <shadow>
    106. <slot>
    107. <small>
    108. <source>
    109. <spacer>
    110. <span>
    111. <strike>
    112. <strong>
    113. <style>
    114. <sub>
    115. <summary>
    116. <sup>
    117. <table>
    118. <tbody>
    119. <td>
    120. <template>
    121. <textarea>
    122. <tfoot>
    123. <th>
    124. <thead>
    125. <time>
    126. <title>
    127. <tr>
    128. <track>
    129. <tt>
    130. <u>
    131. <ul>
    132. <var>
    133. <video>
    134. <wbr>
    135. <xmp>
  8. Global attributes
    1. accesskey
    2. autocapitalize
    3. autofocus
    4. class
    5. contenteditable
    6. contextmenu
    7. data-*
    8. dir
    9. draggable
    10. enterkeyhint
    11. hidden
    12. id
    13. inputmode
    14. is
    15. itemid
    16. itemprop
    17. itemref
    18. itemscope
    19. itemtype
    20. lang
    21. nonce
    22. part
    23. slot
    24. spellcheck
    25. style
    26. tabindex
    27. title
    28. translate
    29. x-ms-acceleratorkey
    30. x-ms-format-detection
  9. <input> types
    1. <input type="button">
    2. <input type="checkbox">
    3. <input type="color">
    4. <input type="date">
    5. <input type="datetime-local">
    6. <input type="datetime">
    7. <input type="email">
    8. <input type="file">
    9. <input type="hidden">
    10. <input type="image">
    11. <input type="month">
    12. <input type="number">
    13. <input type="password">
    14. <input type="radio">
    15. <input type="range">
    16. <input type="reset">
    17. <input type="search">
    18. <input type="submit">
    19. <input type="tel">
    20. <input type="text">
    21. <input type="time">
    22. <input type="url">
    23. <input type="week">
  10. Documentation:
  11. Useful lists
    1. All pages index
  12. Contribute
    1. The MDN project
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies