Sample HTML files for testing parsers and sanitisers — free, CC0

HTML is read by far more than browsers: sanitisers, converters, scrapers, email clients and anything that generates a preview. These documents give each of those something valid and predictable to work with.

html/basic.html is a minimal, valid HTML5 document — a doctype, a declared charset, a heading and two paragraphs. html/all-elements.html is the broad one: semantic sections, a table with a caption and header cells, a form with no action, lists, a figure and media elements. html/with-inline-css.html moves the styling into a style block, and html/with-inline-js.html carries a single inline script that logs one line and does nothing else.

That last file is the only script in the catalog, and it is deliberate: there are no event handler attributes, no javascript: URLs and no references to other hosts anywhere, and a validator enforces that on every build. The edge serves it under a sandboxing policy.

Use them to test parsers, sanitisers, converters and upload handling. Related formats: CSS, JavaScript and Markdown.

4 files. The same list as JSON: https://loremfile.dev/html/index.json

HTML files
FileSizePropertiesDescription
all-elements.html 2.6 KB Semantic sections, a table with a caption and header cells, a form with no action, lists, a figure, and media elements pointing at published fixtures.
Snippets
curl -O https://loremfile.dev/html/all-elements.html
<a href="https://loremfile.dev/html/all-elements.html">download</a>
basic.html 779 B A minimal, valid HTML5 document: a doctype, a declared charset, a heading and two paragraphs.
Snippets
curl -O https://loremfile.dev/html/basic.html
<a href="https://loremfile.dev/html/basic.html">download</a>
with-inline-css.html 696 B A document whose styles live in a style block rather than an external sheet.
Snippets
curl -O https://loremfile.dev/html/with-inline-css.html
<a href="https://loremfile.dev/html/with-inline-css.html">download</a>
with-inline-js.html 947 B A document with one inline script that logs a line and does nothing else. The edge serves it with a sandbox CSP, so a browser runs nothing.
Snippets
curl -O https://loremfile.dev/html/with-inline-js.html
<a href="https://loremfile.dev/html/with-inline-js.html">download</a>

File names follow the naming grammar. Verify a download against sha256sums.txt.