Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Create a Website with HTML

Make a first HTML website by creating an index.html file, adding page content, previewing it locally, and choosing a way to publish when it is ready.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can create a basic website with HTML by making a folder, adding an index.html file, writing page content with HTML elements, and opening the file in a browser. HTML supplies the structure; CSS adds visual styling. Previewing the file locally lets you work on it before you choose how to publish it online.

What you need to make your first HTML website

For a first static page, you need a place to save a file and a web browser to preview it. You do not need hosting or a domain just to write and view the page on your own computer. MDN’s first-website guide is designed for readers new to web technologies and covers building and publishing a simple site.

Start with a narrow goal, such as a personal profile, a page about a hobby, or a simple landing page. A small first page makes it easier to focus on how HTML elements fit together.

Create an HTML page and preview it

  1. Make a project folder. Create a folder somewhere easy to find, such as my-first-site.
  2. Create the home-page file. Inside that folder, create a plain-text file named index.html. This is the conventional filename for a basic website’s home page. Make sure your editor has not added an extra extension such as .txt.
  3. Add the page structure and content. Use elements for the page title, headings, paragraphs, links, and lists. The example below is a complete starting page; replace the sample text and link with your own.
  4. Save and open it in a browser. Open index.html from your file manager, or use your browser’s open-file command and select it. The browser renders the local file, so you can check your changes without publishing it.
  5. Edit, save, and refresh. After changing the HTML, save the file and reload the browser tab to see the updated page.
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>My First Website</title>
  </head>
  <body>
    <h1>Hello, world!</h1>
    <p>This is my first website, built with HTML.</p>
    <h2>What I enjoy</h2>
    <ul>
      <li>Learning how websites work</li>
      <li>Making things to share</li>
    </ul>
    <p>Visit <a href="https://developer.mozilla.org/">MDN Web Docs</a> to keep learning.</p>
  </body>
</html>

What the main parts do

  • <!doctype html> tells the browser to use modern HTML rendering.
  • <html lang="en"> wraps the document and identifies its language.
  • <head> holds document information such as the character encoding, viewport setting, and browser-tab title.
  • <body> contains the content visitors see on the page.
  • <h1>, <h2>, <p>, <ul>, and <a> mark up a main heading, a section heading, a paragraph, a list, and a link.

HTML describes the content and its structure. It does not by itself provide a full visual design, application logic, data storage, payment handling, or a backend.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Add CSS for appearance

CSS is the language used to style and lay out a page. It can control colors, fonts, spacing, and columns; it complements HTML rather than replacing it. For a quick first experiment, add a <style> block inside <head>, before </head>:

<style>
  body {
    max-width: 42rem;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: sans-serif;
    line-height: 1.6;
  }

  h1 {
    color: #174a7e;
  }
</style>

Save the file and refresh the browser to see the style. As the page grows, you can move the CSS into a separate file and link it from the HTML. MDN explains the distinction between page structure and presentation in its first-website material.

Check the page before publishing

A browser preview is a local check, not a public website. Before sharing the page, review the rendered result and confirm that the text, headings, and links appear as intended.

  • If the page displays the HTML tags as text, confirm the filename ends in .html and that you opened the saved file in a browser.
  • If an edit does not appear, save the file and reload the tab. Check that you edited the same index.html that the browser opened.
  • If a link does not work, inspect its href value and make sure it contains the intended address.

Publish the HTML website online

Publishing means making the site files available from a web server so other people can visit them. A domain is the public web address; hosting is where the files are served from. Neither is required for writing your first page locally.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

MDN describes more than one route to publishing, including repository-based publishing and buying hosting and a domain for more control. Choose based on how much setup and control you want, whether you need a custom domain, and the host’s current limits and costs. The available evidence does not establish current prices or terms for specific providers, so check the provider’s documentation before choosing. See MDN’s guide to publishing your website for an introduction to the options.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a screenshot of a webpage rather than a site built from scratch, ScreenshotNeo takes a screenshot or PDF from one API request. For example, save a WebP screenshot of a page with cURL:

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for setup and options. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.