Sample HTML File Download — Free HTML5 Example Pages
Download free HTML example pages from 3KB to 1MB — forms, tables, landing pages, and HTML email template samples. Use these HTML test files for web scraping testing (Cheerio, Puppeteer), browser testing, email template testing, and HTML parser testing. All valid HTML5 with realistic content.
sample-5kb.html
80 lines
sample-10kb.html
200 lines
sample-50kb.html
1,000 lines
sample-100kb.html
2,000 lines
sample-500kb.html
10,000 lines
sample-1mb.html
20,000 lines
sample-simple-page.html
50 lines
sample-form-page.html
150 lines
sample-email-template.html
250 lines
sample-table-page.html
400 lines
Use cases for sample HTML files
- Testing web scrapers and crawlers (Cheerio, Puppeteer, Playwright)
- Verifying HTML parsers and DOM libraries (jsdom, htmlparser2)
- Testing email rendering in email clients (Outlook, Gmail)
- Benchmarking browser rendering and paint performance
- Testing HTML-to-PDF conversion tools (Puppeteer, wkhtmltopdf)
- Validating accessibility tools and screen readers
HTML variants included
| Variant | Elements | Use case |
|---|---|---|
| Simple page | header, nav, sections, footer | Basic scraping, DOM parsing |
| Form page | inputs, selects, textareas, checkboxes | Form testing, Playwright/Cypress |
| Table page | thead, tbody, tr, td, th | Data extraction, table scraping |
| Media page | img, video, iframe, lazy loading | Media detection, lazy load testing |
| Landing page | hero, cards, grid, CTA buttons | Full-page rendering, performance |
| Email template | table layout, inline CSS | Email rendering, template testing |
How to parse HTML files
# JavaScript — Cheerio (server-side jQuery)
const cheerio = require('cheerio');
const $ = cheerio.load(html);
$('table tr').each((i, row) => {
console.log($(row).text());
});
# JavaScript — jsdom (full DOM)
const { JSDOM } = require('jsdom');
const dom = new JSDOM(html);
const title = dom.window.document.querySelector('title').textContent;
# Python — BeautifulSoup
from bs4 import BeautifulSoup
soup = BeautifulSoup(html, 'html.parser')
for link in soup.find_all('a'):
print(link.get('href'))
# Python — lxml (fast)
from lxml import html as lhtml
tree = lhtml.fromstring(html_content)
rows = tree.xpath('//table//tr')
# CLI — extract all links
grep -oP 'href="\K[^"]+' page.htmlTechnical specifications
| Standard | HTML5 (WHATWG Living Standard) |
| Extension | .html, .htm |
| MIME type | text/html |
| Encoding | UTF-8 |
| Content | Realistic faker.js data (names, emails, products) |
| CSS | Embedded <style> tag (no external files) |
Frequently Asked Questions
Other data formats
Related reading
Mocking REST APIs with JSON Fixtures
Fast frontend iteration without a backend. MSW, json-server, and sample fixtures for users, products, and nested objects. Copy-paste examples.
Sample JSON Data for API Testing and Mocking
Free sample JSON files for testing REST APIs. Users, products, nested objects, GeoJSON, and API response wrappers with code examples.
Seeding Test Databases with Sample Data — SQL, JSON, CSV
How to seed development and staging databases using sample SQL dumps, JSON files, and CSV imports from TrueFileSize. Covers PostgreSQL, MySQL, SQLite, MongoDB, and Prisma.