Lorem Ipsum HTML Templates: 9 Components and Emmet Shortcuts
Copy-paste lorem ipsum HTML templates for nav, hero, cards, pricing, form, table, dialog, article and footer, with Emmet abbreviations and a worst-case text overflow test.
On this page ⌄
These are nine page components with placeholder text already in them, meant to be pasted into a prototype and styled. They use semantic elements, so they also work as an accessibility baseline. After the templates there is a section on Emmet abbreviations (all expanded for real with the emmet library, not typed from memory), then a text set for testing overflow, because the usual lorem ipsum never breaks a layout and real content does. To preview any block as you edit it, paste it into the HTML Viewer; to generate text of an exact length, use the Lorem Ipsum Generator.
Placeholder images that actually load
Both of these returned an image when requested on 2026-11-02:
<img src="https://placehold.co/600x400" alt="" width="600" height="400">
<img src="https://picsum.photos/600/400" alt="" width="600" height="400">
placehold.co returns a plain grey SVG with the size written on it (add ?text=Hero to change the label). picsum.photos redirects (HTTP 302) to a random photo, and https://picsum.photos/seed/xerobit/600/400 returns the same photo each time, which you want for a stable screenshot. Always set width and height so the layout does not jump while the image loads.
1. Navigation
<header>
<a href="/">Acme</a>
<nav aria-label="Main">
<ul>
<li><a href="#" aria-current="page">Products</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">Docs</a></li>
<li><a href="#">Blog</a></li>
</ul>
</nav>
<a href="#">Sign in</a>
</header>
2. Hero
<section>
<h1>Lorem ipsum dolor sit amet</h1>
<p>Consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p>
<a href="#">Get started</a>
<a href="#">Learn more</a>
</p>
<img src="https://placehold.co/1200x600" alt="" width="1200" height="600">
</section>
3. Card grid
<section aria-labelledby="features">
<h2 id="features">Lorem ipsum features</h2>
<ul>
<li>
<article>
<img src="https://placehold.co/600x400" alt="" width="600" height="400" loading="lazy">
<h3>Dolor sit amet</h3>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
<a href="#">Read more</a>
</article>
</li>
<li>
<article>
<img src="https://placehold.co/600x400" alt="" width="600" height="400" loading="lazy">
<h3>Consectetur elit</h3>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse.</p>
<a href="#">Read more</a>
</article>
</li>
<li>
<article>
<img src="https://placehold.co/600x400" alt="" width="600" height="400" loading="lazy">
<h3>Tempor incididunt</h3>
<p>Excepteur sint occaecat cupidatat non proident, sunt in culpa.</p>
<a href="#">Read more</a>
</article>
</li>
</ul>
</section>
4. Pricing
<section aria-labelledby="pricing">
<h2 id="pricing">Lorem pricing</h2>
<div>
<article>
<h3>Starter</h3>
<p><strong>$0</strong> / month</p>
<ul>
<li>Lorem ipsum dolor</li>
<li>Sit amet consectetur</li>
</ul>
<a href="#">Choose Starter</a>
</article>
<article>
<h3>Pro</h3>
<p><strong>$19</strong> / month</p>
<ul>
<li>Everything in Starter</li>
<li>Adipiscing elit sed do</li>
<li>Eiusmod tempor</li>
</ul>
<a href="#">Choose Pro</a>
</article>
<article>
<h3>Team</h3>
<p><strong>$49</strong> / month</p>
<ul>
<li>Everything in Pro</li>
<li>Incididunt ut labore</li>
<li>Dolore magna aliqua</li>
</ul>
<a href="#">Choose Team</a>
</article>
</div>
</section>
5. Form
<form action="#" method="post">
<p>
<label for="name">Name</label>
<input id="name" name="name" type="text" autocomplete="name" required>
</p>
<p>
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email" required>
</p>
<p>
<label for="topic">Topic</label>
<select id="topic" name="topic">
<option>Lorem ipsum</option>
<option>Dolor sit amet</option>
</select>
</p>
<p>
<label for="msg">Message</label>
<textarea id="msg" name="msg" rows="4"></textarea>
</p>
<button type="submit">Send message</button>
</form>
6. Data table
<table>
<caption>Lorem ipsum orders</caption>
<thead>
<tr><th scope="col">Order</th><th scope="col">Customer</th><th scope="col">Status</th><th scope="col">Total</th></tr>
</thead>
<tbody>
<tr><td>#1001</td><td>Lorem Ipsum</td><td>Shipped</td><td>$129.00</td></tr>
<tr><td>#1002</td><td>Dolor Sit</td><td>Pending</td><td>$48.50</td></tr>
<tr><td>#1003</td><td>Amet Consectetur</td><td>Refunded</td><td>$9.99</td></tr>
</tbody>
</table>
7. Modal dialog
The native <dialog> element needs no framework:
<button type="button" onclick="document.getElementById('dlg').showModal()">Open</button>
<dialog id="dlg" aria-labelledby="dlg-title">
<h2 id="dlg-title">Lorem ipsum dolor</h2>
<p>Sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt.</p>
<form method="dialog">
<button>Cancel</button>
<button value="ok">Confirm</button>
</form>
</dialog>
Loaded in Chrome 156 and opened with showModal(), it reported open and the form buttons closed it, with returnValue set to the button's value.
8. Article
<article>
<header>
<h1>Lorem ipsum dolor sit amet consectetur</h1>
<p>By Jane Smith, <time datetime="2026-11-02">2 November 2026</time>, 6 min read</p>
</header>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<h2>Ut enim ad minim veniam</h2>
<p>Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<blockquote><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.</p></blockquote>
<ul>
<li>Excepteur sint occaecat</li>
<li>Cupidatat non proident</li>
</ul>
</article>
9. Footer
<footer>
<p>Acme, Inc. Lorem ipsum dolor sit amet.</p>
<nav aria-label="Footer">
<a href="#">Privacy</a>
<a href="#">Terms</a>
<a href="#">Contact</a>
</nav>
<p><small>© 2026 Acme, Inc.</small></p>
</footer>
Emmet abbreviations for the same blocks
VS Code expands Emmet on Tab in HTML files. Each abbreviation below was run through the emmet npm package (2.4.11), the same expansion library VS Code uses, and the output is pasted as produced.
| abbreviation | what it gives |
|---|---|
lorem | 30 words |
lorem5 | 5 words |
p*3>lorem | three paragraphs of 30 words each (90 words total, measured) |
ul>li*3>lorem2 | list of three items, two words each |
A real expansion of ul>li*3>lorem2:
<ul>
<li>Lorem, ipsum.</li>
<li>Quis, ipsum.</li>
<li>Earum, nemo?</li>
</ul>
Two surprises, both measured. The text is random on every expansion: running p*2>lorem10 twice gave different paragraphs each time, so a snippet of Emmet output in a tutorial will never match what you get. And only the first generated block tends to start with the classic "Lorem ipsum dolor sit amet" opening; the rest is random Latin-ish words with commas, question marks and exclamation marks mixed in. If you need identical text for screenshots or snapshot tests, generate it once and keep it, or use a seeded generator (below).
Abbreviations for the components above (outputs trimmed to structure):
header>nav>ul>li*4>a[href=#]>lorem1
section.hero>h1>lorem4^p>lorem15^a.btn[href=#]{Get started}
.card>img[src=https://placehold.co/600x400 alt]+.card-body>h3>lorem4^p>lorem18^a.btn[href=#]{Read more}
table>thead>tr>th*3{Col $}^^tbody>tr*3>td*3>lorem1
form>(label[for=name]{Name}+input#name[name=name])+button[type=submit]{Send}
The hero abbreviation expands to a <section class="hero"> with the h1, a 15-word paragraph and <a href="#" class="btn">Get started</a>. The table abbreviation produces a thead with Col 1 to Col 3 headings and three body rows. img[... alt] with no value gives alt="", which is the right default for decorative placeholders.
Test the layout with worst-case text
Fixed-length lorem ipsum is the kindest content a layout will ever see. Real content has long product names, German compound words, email addresses and URLs. Paste this into the cards and table cells above:
Short: Lorem ipsum dolor
Sentence pair: Lorem ipsum dolor sit amet. Consectetur adipiscing elit.
Worst case: Pneumonoultramicroscopicsilicovolcanoconiosis-and-a-very-long-address@internal.corp.example.com https://example.com/a/very/long/path/that/never/breaks/because/it/has/no/spaces/at/all?utm_source=newsletter&utm_campaign=autumn-sale-2026
Measured with that worst-case string inside a 240px card in Chrome 156:
| setup | scrollWidth vs card width | overflows? |
|---|---|---|
| default styles | 570px in a 238px box | yes |
overflow-wrap: anywhere on the card | 238px in a 238px box | no |
grid grid-template-columns: 1fr 1fr, 400px wide | column stretched to 558px | yes, breaks the grid |
grid minmax(0, 1fr) 1fr | column stays 200px, text still 558px wide | yes, until you add overflow-wrap too |
So the practical fix is overflow-wrap: anywhere on text containers, plus minmax(0, 1fr) instead of plain 1fr for grid columns that hold user text. For the other end of the range, also try an empty string and one very short word (Hi), since layouts break there too.
Generate placeholder text in code
For seeded, repeatable text inside tests or seed scripts:
// npm i @faker-js/faker (tested with 10.6.0)
import { faker } from '@faker-js/faker';
faker.seed(42);
faker.lorem.sentence(); // 'Virga synagoga patruus armarium armarium.' (same every run with seed 42)
// npm i lorem-ipsum (tested with 3.0.0)
import { LoremIpsum } from 'lorem-ipsum';
const lorem = new LoremIpsum({ wordsPerSentence: { min: 5, max: 12 } });
lorem.generateWords(5); // e.g. 'ut sint culpa anim eiusmod'
# pip install faker (tested with 40.44.0)
from faker import Faker
f = Faker('la'); Faker.seed(1)
f.sentence(nb_words=6) # 'Necessitatibus rem aperiam blanditiis.' (same every run with seed 1)
Note the locale: in Python, Faker() with the default English locale returns English words such as "quality set weight"; Faker('la') returns the Latin placeholder words. Seeded Faker and lorem-ipsum differ in vocabulary, so pick one per project. For one-off copy-paste text, the browser tool is faster than any package.
FAQ
Where can I get a lorem ipsum HTML template?
Copy the blocks above; each is valid, semantic HTML with no classes, so they take whatever CSS framework you use. They are also a decent starting point for a boilerplate repository. To produce the text itself at a chosen length, use the Lorem Ipsum Generator with HTML paragraph wrapping.
How do I add lorem ipsum in VS Code?
Type lorem and press Tab in an HTML file. lorem20 gives 20 words and p*3>lorem three paragraphs. The text differs every time you expand it.
How do I do lorem ipsum with images?
Use https://placehold.co/600x400 for a labelled grey box, or https://picsum.photos/seed/anything/600/400 for a stable photograph. Add width, height and loading="lazy" for below-the-fold images.
Should lorem ipsum be left in a live page?
No. Search for the string "lorem ipsum" before every release; a placeholder paragraph left on a published page is indexable text.
Tested
2026-11-02. Emmet output from emmet 2.4.11 on Node 25. Image URLs requested over HTTPS (200 for placehold.co, 302 then 200 for picsum.photos). Overflow and <dialog> behaviour in Chrome 156.0.8078.48 via playwright-core. Package snippets run with @faker-js/faker 10.6.0, lorem-ipsum 3.0.0 and Python Faker 40.44.0. Every HTML block in this post was checked for balanced tags by script. Not tested: how the Emmet output looks inside editors other than through the library. To shrink finished markup, see the HTML Minifier.
Keep reading
Related tools
Lorem Ipsum Generator
Generate placeholder text, words, sentences, or paragraphs. Classic lorem ipsum plus alternatives (hipster, cupcake, pirate). HTML-wrapped output option.
Hours Calculator
Add start, end and break times for each day to see daily hours, weekly totals and overtime instantly.
Character Counter
Count characters, words, sentences, lines and UTF-8 bytes with live SEO and social media limit tracking.
Keyboard Test
Press any key to see it light up and find dead, stuck or double-typing keys, with rollover checks for full size, TKL and 75% layouts.
Written by Mian Ali Khalid. More guides in Dev Productivity.