DEV Community

Cover image for How to turn an HTML file into a website that stays up
Ilya Letunov
Ilya Letunov

Posted on

How to turn an HTML file into a website that stays up

You have one HTML file: a landing page an AI assistant wrote, a portfolio, an event page, a small report. It looks right when you double-click it. Now you want it to be a website: an address that works next week, opens on any device and can sit on your own domain.

Here are three ways to get there, from the most hands-on to the quickest.

GitHub Pages

Create a repository, put the file in it as index.html, and turn on Pages in the repository settings. The site appears at username.github.io/repo within a minute or two, and you can point your own domain at it.

It is free and reliable, and it suits you if you already use Git. The cost is the setup: an account, a repository, and a commit for every change.

Netlify Drop

Drag a folder with the file onto Netlify's drop page and you get a live address in seconds. To keep the site and connect a domain, you claim it with a Netlify account.

Good for a quick deploy of a folder. Each new version means dragging the folder again.

Paste it into a browser tool

If the HTML is one document, you can skip files and folders. Birta's HTML to Website tool works in three steps:

  1. Paste the code or drop the .html file. Your browser draws the page as you type, and nothing is sent anywhere yet.
  2. Press "Get a link to send". The page goes online at an address that opens for 24 hours, with no account.
  3. To keep it, copy it into a free account with one click. It becomes a project with a permanent address, and you can connect your own domain on the free plan.

After that, each change is a new version at the same address, and an earlier version can be restored. You can make the edit yourself, ask Birta's agent, or ask the agent you already use.

What to check before you call it a website

Whatever route you take, open the live address on a phone and look for three things:

  • Separate files. Styles and scripts written inside the document travel with it. A stylesheet or images in a folder next to the file do not; they have to be inlined or uploaded with it.
  • Absolute paths. Links like /about or C:\Users\... that worked on your disk break online. Use relative paths or full URLs.
  • The title and preview. Set a <title> and a meta description. That is what people see in a browser tab and in a shared link.

Quick reference

You want Use
a site in a Git workflow GitHub Pages
to deploy a folder in seconds Netlify Drop
one HTML file online without setup, then kept with versions and a domain a paste-in tool such as Birta

Top comments (0)