Skip to content
>_ TrueFileSize.com

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.

Generate custom HTML fileCreate up to 1GB locally in your browser

sample-5kb.html

5 KB

80 lines

Verified file details
Filename
sample-5kb.html
Exact size
5,120 bytes
Displayed size
5 KB
MIME type
application/octet-stream
Lines
80
Note
simple-page
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-5kb.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-10kb.html

10 KB

200 lines

Verified file details
Filename
sample-10kb.html
Exact size
10,240 bytes
Displayed size
10 KB
MIME type
application/octet-stream
Lines
200
Note
with-forms
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-10kb.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-50kb.html

50 KB

1,000 lines

Verified file details
Filename
sample-50kb.html
Exact size
51,200 bytes
Displayed size
50 KB
MIME type
application/octet-stream
Lines
1,000
Note
with-tables
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-50kb.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-100kb.html

100 KB

2,000 lines

Verified file details
Filename
sample-100kb.html
Exact size
102,400 bytes
Displayed size
100 KB
MIME type
application/octet-stream
Lines
2,000
Note
with-media-embeds
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-100kb.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-500kb.html

500 KB

10,000 lines

Verified file details
Filename
sample-500kb.html
Exact size
512,000 bytes
Displayed size
500 KB
MIME type
application/octet-stream
Lines
10,000
Note
multi-section-landing-page
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-500kb.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-1mb.html

1 MB

20,000 lines

Verified file details
Filename
sample-1mb.html
Exact size
1,048,576 bytes
Displayed size
1 MB
MIME type
application/octet-stream
Lines
20,000
Note
full-website
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-1mb.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-simple-page.html

3 KB

50 lines

Verified file details
Filename
sample-simple-page.html
Exact size
3,072 bytes
Displayed size
3 KB
MIME type
application/octet-stream
Lines
50
Note
minimal-html5
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-simple-page.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-form-page.html

8 KB

150 lines

Verified file details
Filename
sample-form-page.html
Exact size
8,192 bytes
Displayed size
8 KB
MIME type
application/octet-stream
Lines
150
Note
contact-form
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-form-page.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-email-template.html

12 KB

250 lines

Verified file details
Filename
sample-email-template.html
Exact size
12,288 bytes
Displayed size
12 KB
MIME type
application/octet-stream
Lines
250
Note
email-template
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-email-template.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

sample-table-page.html

20 KB

400 lines

Verified file details
Filename
sample-table-page.html
Exact size
20,480 bytes
Displayed size
20 KB
MIME type
application/octet-stream
Lines
400
Note
data-table
License
CC0 / Public Domain
Download URL
https://cdn.truefilesize.com/html/sample-table-page.html

See how TrueFileSize generates and measures sample files, or review the editorial policy.

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

VariantElementsUse case
Simple pageheader, nav, sections, footerBasic scraping, DOM parsing
Form pageinputs, selects, textareas, checkboxesForm testing, Playwright/Cypress
Table pagethead, tbody, tr, td, thData extraction, table scraping
Media pageimg, video, iframe, lazy loadingMedia detection, lazy load testing
Landing pagehero, cards, grid, CTA buttonsFull-page rendering, performance
Email templatetable layout, inline CSSEmail 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.html

Technical specifications

StandardHTML5 (WHATWG Living Standard)
Extension.html, .htm
MIME typetext/html
EncodingUTF-8
ContentRealistic faker.js data (names, emails, products)
CSSEmbedded <style> tag (no external files)

Frequently Asked Questions

What is an HTML file?
An HTML (HyperText Markup Language) file is a text document with .html or .htm extension that web browsers render as a web page. It contains structured content using tags like <h1>, <p>, <table>, <form>, <img>, and <a>. HTML5 is the current standard (WHATWG Living Standard), adding semantic elements (header, nav, section, article, footer), multimedia (video, audio), and APIs (Canvas, Web Storage).
HTML vs HTM — What is the difference?
There is no difference — .html and .htm are the same format. The .htm extension originated from DOS/Windows 3.1 which limited extensions to 3 characters. Modern systems use .html (preferred). Web servers treat both identically. Our sample files use .html following current best practice.
How to create an HTML file?
Open any text editor (VS Code, Notepad++, Sublime), create a file with .html extension, add <!DOCTYPE html> at the top followed by <html>, <head>, and <body> tags. Save and open in a browser. Our HTML5 sample page file provides a complete starting template with proper meta tags, semantic elements, and embedded CSS — download it as a reference.
Can I use these for web scraping and browser testing?
Yes — that's the primary use case. Table pages have realistic data rows for extraction testing with Cheerio, BeautifulSoup, or lxml. Form pages have input/select/textarea elements for Playwright, Puppeteer, and Selenium automation. Media pages have img/video/iframe for detection testing. Email templates test rendering in Outlook, Gmail, and Apple Mail.
Are the sample HTML files valid HTML5?
Yes. Every file starts with <!DOCTYPE html>, includes <meta charset='UTF-8'> and viewport meta tags, uses semantic HTML5 elements (header, nav, main, section, footer), and passes W3C validation. CSS is embedded in a <style> tag — each file is fully self-contained with no external dependencies.

Other data formats

Related reading