Step 1: Start from one complete HTML file
The simplest page is a single self-contained file with its CSS and JavaScript inside it. Save it as index.html. Here is a minimal page you can use to test:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My first page</title>
<style>body{font-family:system-ui;max-width:40rem;margin:4rem auto;padding:0 1rem}</style>
</head>
<body>
<h1>Hello, world</h1>
<p>This page is hosted online.</p>
</body>
</html>Step 2: Create a free account and a site
Sign up, open the dashboard and click New site. Type a name, then paste your HTML or use Import a file to load the .html from your computer. The original file name does not matter: the content becomes the main page of the site.
Step 3: Claim a free address
In the Free domain field, type the name you want. It is checked while you type, and https://yourname.hostedwebpage.com/ is yours once you publish. Choose Public so anyone with the link can open it, or Private to keep it to yourself.
Step 4: Add CSS, JavaScript and images
If your page links to other files, open Edit on the site and use Upload files. Files are served next to your page, so relative paths work exactly as they do on your computer:
- <link rel="stylesheet" href="style.css">
- <script src="app.js"></script>
- <img src="images/logo.png" alt="Logo">
A folder with its own index.html, such as docs/index.html, opens at https://yourname.hostedwebpage.com/docs/.
Step 5: Update the page and keep the link
Edit the HTML at any time and save. The address stays the same, and every version is kept so you can restore an earlier one.
If something does not work
- Images or styles are missing: check that the file is uploaded and that the path matches exactly, including upper and lower case.
- The page is blank: open your browser's developer console and look for script errors.
- The file is too large: the HTML page can be up to 5 MB and each extra file up to 4 MB.
- A form should send email or save to a database: static hosting has no server code. Use the site's JSON document for simple data, or an external form service.
Why share a link instead of the file
A link opens in any browser with nothing to download, always shows the latest version and works on phones. HTML files sent as attachments are frequently blocked or stripped by email filters.