Skip to content

Instantly share code, notes, and snippets.

@sabernhardt
Last active June 11, 2024 09:03
Show Gist options
  • Save sabernhardt/81181e21779d96af07a8cf362a2afba1 to your computer and use it in GitHub Desktop.
Save sabernhardt/81181e21779d96af07a8cf362a2afba1 to your computer and use it in GitHub Desktop.
<!-- wp:paragraph -->
<p>Table block with default styles</p>
<!-- /wp:paragraph -->
<!-- wp:table {"hasFixedLayout":false} -->
<figure class="wp-block-table"><table><thead><tr><th>thead th 1</th><th>thead th 2</th></tr></thead><tbody><tr><td>tbody td: row 1, column 1</td><td>tbody td: row 1, column 2</td></tr><tr><td>tbody td: row 2, column 1</td><td>tbody td: row 2, column 2</td></tr></tbody><tfoot><tr><td>tfoot td: column 1</td><td>tfoot td: column 2</td></tr></tfoot></table><figcaption class="wp-element-caption">figcaption</figcaption></figure>
<!-- /wp:table -->
<!-- wp:paragraph -->
<p>Table block with theme's Medium preset</p>
<!-- /wp:paragraph -->
<!-- wp:table {"hasFixedLayout":false,"fontSize":"medium"} -->
<figure class="wp-block-table has-medium-font-size"><table><thead><tr><th>thead th 1</th><th>thead th 2</th></tr></thead><tbody><tr><td>tbody td: row 1, column 1</td><td>tbody td: row 1, column 2</td></tr><tr><td>tbody td: row 2, column 1</td><td>tbody td: row 2, column 2</td></tr></tbody><tfoot><tr><td>tfoot td: column 1</td><td>tfoot td: column 2</td></tr></tfoot></table><figcaption class="wp-element-caption">figcaption</figcaption></figure>
<!-- /wp:table -->
<!-- wp:paragraph -->
<p>Table block with 21px font size</p>
<!-- /wp:paragraph -->
<!-- wp:table {"hasFixedLayout":false,"style":{"typography":{"fontSize":"21px"}}} -->
<figure style="font-size:21px" class="wp-block-table"><table><thead><tr><th>thead th 1</th><th>thead th 2</th></tr></thead><tbody><tr><td>tbody td: row 1, column 1</td><td>tbody td: row 1, column 2</td></tr><tr><td>tbody td: row 2, column 1</td><td>tbody td: row 2, column 2</td></tr></tbody><tfoot><tr><td>tfoot td: column 1</td><td>tfoot td: column 2</td></tr></tfoot></table><figcaption class="wp-element-caption">figcaption</figcaption></figure>
<!-- /wp:table -->
<!-- wp:paragraph -->
<p>Calendar block with default styles</p>
<!-- /wp:paragraph -->
<!-- wp:calendar /-->
<!-- wp:paragraph -->
<p>Calendar block with theme's Medium preset</p>
<!-- /wp:paragraph -->
<!-- wp:calendar {"fontSize":"medium"} /-->
<!-- wp:paragraph -->
<p>Calendar block with 21px font size</p>
<!-- /wp:paragraph -->
<!-- wp:calendar {"style":{"typography":{"fontSize":"21px"}}} /-->
<!-- wp:paragraph -->
<p>Classic block with tables that contain a caption element</p>
<!-- /wp:paragraph -->
<table>
<caption>Caption above</caption>
<thead>
<tr>
<th>thead th 1</th>
<th>thead th 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>tbody td: row 1, column 1</td>
<td>tbody td: row 1, column 2</td>
</tr>
<tr>
<td>tbody td: row 2, column 1</td>
<td>tbody td: row 2, column 2</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>tfoot td: column 1</td>
<td>tfoot td: column 2</td>
</tr>
</tfoot>
</table>
<table>
<caption style="caption-side: bottom;">Caption below</caption>
<thead>
<tr>
<th>thead th 1</th>
<th>thead th 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>tbody td: row 1, column 1</td>
<td>tbody td: row 1, column 2</td>
</tr>
<tr>
<td>tbody td: row 2, column 1</td>
<td>tbody td: row 2, column 2</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>tfoot td: column 1</td>
<td>tfoot td: column 2</td>
</tr>
</tfoot>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment