← All updates

HTML tables in markdown render as real tables

Raw HTML table blocks in markdown now render as real tables — merged cells with colspan and rowspan, header cells, alignment and cell backgrounds. Unsupported table HTML falls back to readable text with a warning.

markdowntablesapi

Markdown has always been able to carry a raw HTML table, but until now an HTML <table> in /api/v1/md rendered as stacked cell text — the one shape GitHub renders and we did not. It now renders as a real table, the same way a GFM pipe table does.

That brings the features a pipe table cannot express: cells that span columns (colspan) or rows (rowspan), <thead> header rows with <th> cells, per-cell align and valign, and a style="background-color: …" cell background. Cell content accepts inline markdown and inline HTML, and <br> starts a new line inside the cell. Links and images written as <a> / <img> in a cell render too.

The table directive comments that GFM tables already accepted work on HTML tables as well, on the line before the table: <!-- borderless -->, <!-- full-width --> and <!-- columns: stretch fit -->, combinable in one comment.

This is the engine half of vtable support for our Obsidian plugin — the plugin's adapter will emit a standard HTML table, and any other client can use the same feature. Tables in canvas card content pick it up too, because cards render through the same markdown pipeline.

Table HTML the renderer cannot honour — a nested table, a <caption>, a bad colspan, an unclosed tag, a grid too wide for the page — still renders: you get the cell text in reading order, exactly as before, plus an html-table-fallback layout warning (visible in X-Layout-Warnings on the PDF response and in the JSON layoutWarnings array) so a degraded table is never silent. No API change; the same endpoints and options work.