Topic 3F: Emmet: Wrapping Text in an HTML List

Free Emmet Tutorial

Dive into this detailed Emmet tutorial and learn how to seamlessly add HTML around a plain text list for efficient coding.

This exercise is excerpted from Noble Desktop’s front-end web development (Emmet coding tips) training materials and is compatible with updates through 2022. To continue learning web development with hands-on training, check out our coding bootcamps in NYC and live online.

Front End Web Design Certificate: Live & Hands-on, In NYC or Online, 0% Financing, 1-on-1 Mentoring, Free Retake, Job Prep. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Adding HTML Around a Plain Text List

  1. Select a multi-line plain text list such as:

    Monday
    Tuesday
    Wednesday
    Thursday
    Friday
    Saturday
    Sunday
    
  2. Hit Emmet’s wrap tag keystroke: Option–W (Mac) or Alt–W (Windows). Please note this keystroke only works if you defined it (as we’ve previously explained and had you set up using the instructions in the Before You Begin section near the start of this book).

  3. Type ul>li* to see it wraps all the list items like this:

    <ul>
        <li>Monday</li>
        <li>Tuesday</li>
        <li>Wednesday</li>
        <li>Thursday</li>
        <li>Friday</li>
        <li>Saturday</li>
        <li>Sunday</li>
    </ul>
    
  4. If you add >a so you have ul>li*>a you’ll also get links:

    <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>
    
  5. Hit Return (Mac) or Enter (Windows) to finish.

photo of Dan Rodney

Dan Rodney

Dan Rodney has been a designer and web developer for over 20 years. He creates coursework for Noble Desktop and teaches classes. In his spare time Dan also writes scripts for InDesign (Make Book JacketProper Fraction Pro, and more). Dan teaches just about anything web, video, or print related: HTML, CSS, JavaScript, Figma, Adobe XD, After Effects, Premiere Pro, Photoshop, Illustrator, InDesign, and more.

More articles by Dan Rodney

How to Learn HTML & CSS

Master HTML and CSS with hands-on training. HTML (HyperText Markup Language) and CSS (Cascading Style Sheets) are used to build and style webpages.

Yelp Facebook LinkedIn YouTube Twitter Instagram