Skip to content

Inline HTML

HTML in a note is passed to the PDF as it is, so tags such as <kbd>, <sub>, <sup>, <u> or a styled <div> work.

Markdown

Press <kbd>Ctrl</kbd> + <kbd>P</kbd> to open the command palette.

Water is H<sub>2</sub>O and E = mc<sup>2</sup>.

<span style="color: #c53030">Red text</span> and <u>underlined text</u>.

<div style="border: 1px solid #3182ce; padding: 6px; border-radius: 4px">
A block of raw HTML with its own style.
</div>

PDF

Keyboard keys, sub and superscript, colored and boxed text

HTML comments (<!-- ... -->) are removed. WeasyPrint draws the HTML, so scripts and interactive elements have no effect.

Tags without a closing tag

Some HTML elements hold raw text or are never drawn: <style>, <script>, <title>, <textarea>, <iframe>, <noscript>, <xmp>, <noembed>, <noframes>, <template>, <select> and <plaintext>. When the opening tag of such an element has no closing tag, an HTML parser reads everything after it, to the end of the document, as its content. A sentence like "Anything inside