<w> smolweb

table: The Table element

The <table> HTML element represents tabular data that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.

Attributes

Global attributes

accesskey Specifies a keyboard shortcut to activate or focus an element.

aria-* Defines accessibility properties and states for assistive technologies.

class Specifies one or more CSS class names for styling the element.

data-* Stores custom data private to the page or application.

dir Sets the text direction (left-to-right, right-to-left, or auto).

hidden Hides the element from display and assistive technologies.

id Defines a unique identifier for the element within the document.

inputmode Hints which virtual keyboard type to display on mobile devices.

itemid Provides a global identifier for microdata items.

itemprop Defines a property name-value pair for microdata.

itemref Associates properties with an item via element IDs for microdata.

itemscope Creates a new microdata item container.

itemtype Specifies the vocabulary URL for microdata items (like Schema.org).

lang Specifies the primary language of the element’s content.

nonce Provides a cryptographic nonce for Content Security Policy.

role Defines the element’s semantic role for accessibility.

tabindex Controls keyboard navigation order and focusability.

title Provides advisory information displayed as a tooltip.

Example

<table>
  <caption>IndieWeb Community Events 2024</caption>
  <thead>
    <tr>
      <th>Event</th>
      <th>Location</th>
      <th>Date</th>
      <th>Participants</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>IndieWebCamp Brighton</td>
      <td>Brighton, UK</td>
      <td>March 15-16</td>
      <td>42</td>
    </tr>
    <tr>
      <td>Homebrew Website Club Berlin</td>
      <td>Berlin, Germany</td>
      <td>Monthly</td>
      <td>15-20</td>
    </tr>
    <tr>
      <td>IndieWebCamp Düsseldorf</td>
      <td>Düsseldorf, Germany</td>
      <td>May 11-12</td>
      <td>38</td>
    </tr>
  </tbody>
</table>

<table>
  <caption>Popular Static Site Generators</caption>
  <thead>
    <tr>
      <th>Generator</th>
      <th>Language</th>
      <th>License</th>
      <th>Community Size</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Jekyll</td>
      <td>Ruby</td>
      <td>MIT</td>
      <td>Large</td>
    </tr>
    <tr>
      <td>Hugo</td>
      <td>Go</td>
      <td>Apache 2.0</td>
      <td>Large</td>
    </tr>
    <tr>
      <td>Eleventy</td>
      <td>JavaScript</td>
      <td>MIT</td>
      <td>Growing</td>
    </tr>
    <tr>
      <td>Zola</td>
      <td>Rust</td>
      <td>MIT</td>
      <td>Small</td>
    </tr>
  </tbody>
</table>