By default, text at the start of a line (or after only white space) represents an html tag. Indented tags are nested, creating the tree like structure of html.

li Item A
li Item B
li Item C
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>

Jade also knows which elements are self closing:


Block Expansion

To save space, jade provides an inline syntax for nested tags.

a: img

Self Closing Tags

Tags such as img, meta, link and so on are automatically self-closing (unless you use the xml doctype). You can also explicitly self close a tag by simply appending the / character. Only do this if you know what you’re doing

<foo bar="baz"/>