# html/from-markdown
Render markdown to HTML — a CommonMark-lite renderer covering the deft
markdown dialect plus the standard extras scripts actually meet. All
text is HTML-escaped on output, so the result is safe to embed.
## Syntax
[html/from-markdown $md ?opts]
## Parameters
- `$md` — markdown source text (string)
- `$opts` — optional map: `:full true` wraps the output in an
html/head/body skeleton (with `<meta charset>`); default emits the
body content only
## Examples
[html/from-markdown "# Head\n\nSome **bold**, *italic*, `code`, and a [link](https://dft)."] # => "<h1>Head</h1>\n<p>Some <strong>bold</strong>, <em>italic</em>, ... [html/from-markdown "| A | B |\n| :--- | ---: |\n| 1 | 2 |"] # => a <table> with style="text-align:…" alignment attributes # Text is escaped — embedded markup stays literal [html/from-markdown "plain <b>tags</b>"] # => "<p>plain <b>tags</b></p>\n" # Backslash escapes keep markdown characters literal [html/from-markdown [|printf 'a \\*star\\*']] # => "<p>a *star*</p>\n"
## Returns
An HTML string. Supported: ATX headings `#`–`######`, fenced code
(``` ``` ````/`~~~` with language → `class="language-x"`), flat and
ordered lists, pipe tables (alignment colons kept), single-level `> `
blockquotes, `hr`, paragraphs, and inline `` `code` ``, `**bold**`,
`*italic*`, `[links](url "title")`, ``,
autolinks, backslash escapes. Intraword underscores never emphasise
(`snake_case` stays plain). Pairs with `html/to-markdown` for
round-trips within the shared subset.
## See Also
`html/to-markdown`, `html/serialize`, `html/parse`