Adding HTML Around a Plain Text List
Start by selecting any multi-line plain text list in your editor. For this example, we'll use a simple list of weekdays:
Monday Tuesday Wednesday Thursday Friday Saturday SundayActivate Emmet's wrap tag feature using Option–W (Mac) or ALT–W (Windows). This powerful shortcut transforms selected text using Emmet abbreviations—but it only functions if you've properly configured the keybinding as outlined in the Before You Begin section. If you haven't set this up yet, refer back to those configuration steps before proceeding.
Enter the abbreviation ul>li
*and watch Emmet intelligently wrap each line item. The asterisk (*) tells Emmet to multiply thelielement for each selected line, producing clean, semantically correct markup:<ul> <li>Monday</li> <li>Tuesday</li> <li>Wednesday</li> <li>Thursday</li> <li>Friday</li> <li>Saturday</li> <li>Sunday</li> </ul>To create a navigation menu or linked list, extend the abbreviation by adding >a to get ul>li
*>a. Emmet will automatically generate anchor tags with empty href attributes, ready for you to populate with your target URLs:<ul> <li><a href="">Monday</a></li> <li><a href="">Tuesday</a></li> <li><a href="">Wednesday</a></li> <li><a href="">Thursday</a></li> <li><a href="">Friday</a></li> <li><a href="">Saturday</a></li> <li><a href="">Sunday</a></li> </ul>Press Return (Mac) or Enter (Windows) to execute the transformation. Your plain text list is now properly structured HTML, complete with semantic markup and consistent formatting.
Basic List Wrapping Process
Select Text
Highlight the multi-line plain text list containing items like days of the week or any other list items you want to convert to HTML.
Trigger Wrap Command
Use Option-W on Mac or ALT-W on Windows to activate Emmet's wrap functionality. This keystroke must be configured beforehand.
Enter Wrapper Syntax
Type 'ul>li *' to create an unordered list structure where each text line becomes a list item wrapped in appropriate HTML tags.
Execute Command
Press Return on Mac or Enter on Windows to complete the wrapping process and generate the final HTML structure.
Wrapping Syntax Options
| Feature | Basic List | List with Links |
|---|---|---|
| Emmet Syntax | ul>li * | ul>li * >a |
| Generated Tags per Item | <li>text</li> | <li><a href="">text</a></li> |
| Use Case | Simple content lists | Navigation menus |
| Additional Setup | None required | Href attributes need completion |
Adding '>a' to your ul>li * syntax automatically generates anchor tags within each list item, creating ready-to-use navigation structures with placeholder href attributes.
Emmet Wrapping Analysis
Post-Wrapping Tasks
Check that all opening and closing tags are properly matched and nested correctly
Add actual URLs or page references to generated anchor tags for functional navigation
Include styling classes on ul or li elements to match your design system requirements
Ensure generated lists follow semantic HTML practices for screen readers and other assistive technologies