Create structured content in rows and columns to display information.
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
hasFixedLayout |
boolean |
true |
— |
caption |
rich-text |
— | Source: rich-text. Selector: figcaption. Role: content |
head |
array |
[] |
Source: query. Selector: thead tr |
body |
array |
[] |
Source: query. Selector: tbody tr |
foot |
array |
[] |
Source: query. Selector: tfoot tr |
Supports
Defined via the supports property in block.json.
anchor:truealign:truecolor:gradients:true
spacing:margin:truepadding:true
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
Block Styles
Defined via the styles property in block.json.
| Style Name | Label | Default |
|---|---|---|
regular |
Default | Yes |
stripes |
Stripes | No |
CSS Selectors
Defined via the selectors property in block.json.
- root:
.wp-block-table > table - spacing:
.wp-block-table
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:core/table -->
<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Version</th><th>Musician</th><th>Date</th></tr></thead><tbody><tr><td><a href="https://wordpress.org/news/2003/05/wordpress-now-available/">.70</a></td><td>No musician chosen.</td><td>May 27, 2003</td></tr><tr><td><a href="https://wordpress.org/news/2004/01/wordpress-10/">1.0</a></td><td>Miles Davis</td><td>January 3, 2004</td></tr><tr><td>Lots of versions skipped, see <a href="https://codex.wordpress.org/WordPress_Versions">the full list</a></td><td>…</td><td>…</td></tr><tr><td><a href="https://wordpress.org/news/2015/12/clifford/">4.4</a></td><td>Clifford Brown</td><td>December 8, 2015</td></tr><tr><td><a href="https://wordpress.org/news/2016/04/coleman/">4.5</a></td><td>Coleman Hawkins</td><td>April 12, 2016</td></tr><tr><td><a href="https://wordpress.org/news/2016/08/pepper/">4.6</a></td><td>Pepper Adams</td><td>August 16, 2016</td></tr><tr><td><a href="https://wordpress.org/news/2016/12/vaughan/">4.7</a></td><td>Sarah Vaughan</td><td>December 6, 2016</td></tr></tbody></table></figure>
<!-- /wp:core/table -->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.