Coding: Creating a Simple Website

Published: 2025-08-21 Coding: Creating a Simple Website
For kids

Learn how to create your very own website! It's like building a house, but instead of bricks, you use special words called code. This article will show you how to build a basic website using HTML, the language of the web.

What You'll Need

  • A computer with a text editor (like Notepad on Windows or TextEdit on a Mac).
  • A web browser (like Chrome, Safari, or Firefox).

Let's Get Coding!

We'll build a simple website that says "Hello, World!" Here's how:

  1. Open your text editor.
  2. Type the following code exactly as it is written. Don't worry, we'll explain it later!

<!DOCTYPE html>
<html>
<head>
  <title>My First Website</title>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is my first website!</p>
</body>
</html>
  1. Save the file. Click "File" then "Save As...".
  2. Choose a name for your website, like "mywebsite.html". Make sure to include ".html" at the end of the name.
  3. Choose "All Files" or "Text Encoding: UTF-8" in the "Save as type" or "Encoding" option (if available).
  4. Save the file to your desktop or another easy-to-find location.
  5. Open your web browser (Chrome, Safari, Firefox, etc.).
  6. Click "File" then "Open File..." or drag the file into your browser.
  7. Find the "mywebsite.html" file you saved and open it.

How it Works

Let's break down the code:

  • <!DOCTYPE html>: This tells the web browser that this is an HTML document.
  • <html>: This is the root element; everything else goes inside these tags.
  • <head>: This section contains information about your website, like the title that appears in the browser tab.
  • <title>My First Website</title>: This sets the title of your website.
  • <body>: This section contains the visible content of your website.
  • <h1>Hello, World!</h1>: This is a heading (the biggest text on the page).
  • <p>This is my first website!</p>: This is a paragraph of text.

Try This Next!

Want to make your website even cooler? Try these things:

  • Change the text inside the <h1> and <p> tags to say something else.
  • Add another paragraph by copying the <p> tag and changing the text.
  • Try adding some bold text using the <b> tag, like this: <p>This is <b>bold</b> text.</p>.

Troubleshooting

  • My website doesn't show anything! Make sure you saved the file with the ".html" extension.
  • The text looks funny! Make sure you opened the file in a web browser, not just in your text editor.
  • I made a mistake! Double-check that you typed the code exactly as shown. Spaces and capitalization matter!

You did it! You've created your first website. Keep practicing, and you'll become a web-building expert in no time!