Paste markdown with HTML snippets in fenced blocks, and the preview shows the markup as highlighted code inside a rendered document; share it and reviewers see the same page through a link.
HTML gets discussed in markdown more than it gets rendered there. A component library documents the markup each button variant expects. An accessibility review quotes a form and points out the missing label and aria-describedby. Email developers share a table-based template with notes about which clients mangle it. In all of these, the reader needs to see the source, not a rendered widget.
That matches how this viewer works. Inside a fenced block tagged html, tags, attribute names, attribute values and comments are colored so nested structure is easy to follow. Outside a code block, raw HTML written into the markdown is not rendered; it is displayed as text. That is deliberate and prevents a shared document from injecting markup into the page, but it also means you cannot use HTML to style your document. Write the formatting in markdown and keep HTML for the examples.
Code is shown, never executed, including any script element in a sample. Sharing gives a read-only link that works without an account, plus a separate edit link to keep private. The page expires 15 days after creation. If you need an HTML file of the whole document, Export .html produces one, although code blocks in that file are not highlighted.
How to view HTML in markdown
- Paste your markdown into the editor above, or edit the example.
- Wrap HTML code in a fenced block that starts with ```html.
- The preview shows the rendered document with the code highlighted (side by side on desktop; switch to Preview on a phone).
- Select Share to get a read-only link that anyone can open without an account.
Frequently asked questions
Will my HTML be rendered as a web page?
No. Inside a ```html block it is shown as highlighted source. Raw HTML outside code blocks is not rendered either; it appears as plain text.
Can I use the xml tag instead?
Yes. ```html and ```xml both map to the same markup grammar, so XML snippets such as SVG files or config are highlighted too.