Skip to main content
Noble Desktop/1 min read

Quickly Write Multiple Tags in Sublime Text

Emmet Multi-Tag Patterns

ul>li*5

Tab expands to a ul with five empty li tags.

div*3

Tab expands to three sibling div tags.

p{Hello}*4

Four <p>Hello</p> tags — text inside curly braces.

Cheat Sheet

docs.emmet.io/cheat-sheet — full reference for all multi-tag patterns.

Master Web Development at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate covers HTML, CSS, JavaScript, and the modern web stack.

Sublime Text with Emmet allows you to code faster by typing an abbreviation and then expanding the abbreviation with the Tab key.

To create multiple copies of a tag, add * (asterisk) and the desired number. For example, to get three list item tags you'd type li*3 and hit Tab. Emmet expands li*3 to

<li></li>
<li></li>
<li></li>

Ct expand multiple

Note: This keystroke requires Emmet to be installed in Sublime Text. For instructions on how to install Emmet, download our Sublime Text Enhancements Installation Guide.

Learn more Sublime Text Coding Tips. These coding tips are covered in our hands-on coding classes and bootcamps in NYC.