HTML Runner

How to Run HTML Code

Render a first HTML document in the browser and export it as a file.

What you’ll learn

By the end, you’ll recognize the document skeleton and open the same page in the runner or from your computer.

Create a document

Start in Complete document mode. Use a doctype, a language on the root element, a page title, and body markup. The title belongs in the head.

Run and inspect it

Paste the sample and click Run Code. Change the heading and rerun. The browser parses the markup and displays the document.

Save a portable copy

Download the HTML, then open the resulting file in a browser. If you add assets, use inline styles and scripts for a self-contained exercise.

Try the code

<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><title>Field notes</title></head>
<body><h1>Field notes</h1><p>First entry</p></body>
</html>

Open the editor and paste this sample into the HTML tab.

Troubleshooting

If the downloaded file opens in a text editor, check that the name ends in .html. A name like notes.html.txt may have a hidden extension.

Frequently asked questions

Do I need an HTML compiler?

A browser parses and renders HTML directly. A web server helps with features that need HTTP, such as fetching separate files.

Related resources

Technical references