Skip to main content

๐Ÿ“ Lesson 2: HTML the Quick & Dirty Way

Open Notepad. Type some HTML. Save it. Open it in a browser. Congratulations โ€” you just made a web page. Now let's talk about why you should never do it this way again.

๐ŸŽฏ Learning Objectives

By the end of this lesson, you will be able to:

  • Create a basic HTML file using nothing but a plain text editor
  • Save a file with the .html extension and open it in a browser
  • Identify the problems with using a plain text editor for web development
  • Explain why a code editor like VS Code is worth installing

Estimated Time: 30 minutes

Hands-on: You'll create your very first HTML file!

๐Ÿ“‘ In This Lesson

The Experiment

Before we install any fancy tools, let's prove something important: HTML is just text.

You don't need special software to write HTML. You don't need a license, a compiler, or a development environment. All you need is:

  1. A text editor (literally any text editor)
  2. A web browser

That's it. Let's prove it right now.

โš ๏ธ Windows Users

This lesson uses Notepad (the plain text editor that comes with Windows). If you're on a Mac, you can use TextEdit โ€” but make sure to go to Format โ†’ Make Plain Text first. On Linux, use any text editor like gedit or nano.

Step by Step: Your First HTML File

Step 1: Open Notepad

On Windows, press Win + S, type Notepad, and open it. You should see a blank white window with a blinking cursor. Nothing fancy. That's the point.

Step 2: Type This HTML

Type the following into Notepad exactly as shown:

<h1>Hello, World!</h1>
<p>I just made a web page. In Notepad. Seriously.</p>
<p>This is my <strong>first</strong> HTML file!</p>

That's three lines. That's all you need.

Step 3: Save the File

This is the tricky part. You need to save this as an HTML file, not a regular text file.

  1. Go to File โ†’ Save As
  2. Navigate to your Desktop (so you can find it easily)
  3. In the "File name" field, type: my-page.html
  4. In the "Save as type" dropdown, change it to "All Files (*.*)"
  5. Click Save

โŒ Common Mistake

If you forget to change "Save as type" to "All Files", Notepad will secretly save your file as my-page.html.txt โ€” and your browser won't know it's HTML. Make sure the file on your Desktop is called my-page.html, not my-page.html.txt.

Tip: In File Explorer, go to View โ†’ Show โ†’ File name extensions so you can always see the real file extension.

Step 4: Open It in Your Browser

Go to your Desktop and double-click the file my-page.html. Your default web browser should open and display your page.

You should see:

  • A big bold heading that says "Hello, World!"
  • Two paragraphs of text beneath it
  • The word "first" in bold

It Works! (Sort Of)

Take a moment to appreciate what just happened. You typed three lines of text into the simplest editor on your computer, saved it with a .html extension, and your browser rendered it as a web page.

๐ŸŽ‰ You Just Made a Web Page!

No server. No hosting. No special software. Just a text file and a browser.

Look at the browser's address bar. You'll see something like:

file:///C:/Users/YourName/Desktop/my-page.html

That file:/// prefix means the browser is reading a local file from your computer โ€” not downloading it from a server on the internet. It's your file, on your Desktop, rendered in your browser. Simple.

Now look at the page itself. It's ugly, right? The text is small, the font is plain, there's no color, no layout, no personality. It looks like a document from 1996. That's because we only used HTML โ€” we haven't added any CSS yet. That comes later.

But it works. And that's the important thing to internalize: at its core, a web page is just a text file that a browser knows how to read.

Try Adding More

Let's experiment a bit. Go back to Notepad (your file should still be open) and add some more content:

<h1>Hello, World!</h1>
<p>I just made a web page. In Notepad. Seriously.</p>
<p>This is my <strong>first</strong> HTML file!</p>

<h2>Things I Like</h2>
<ul>
    <li>Pizza</li>
    <li>Video games</li>
    <li>Making web pages in Notepad, apparently</li>
</ul>

<h2>About Me</h2>
<p>I am learning HTML and CSS. I started about five minutes ago.</p>
<p>Visit <a href="https://www.google.com">Google</a> if you get bored.</p>

Save the file (Ctrl + S), then go back to your browser and refresh the page (Ctrl + R or F5).

You should now see:

  • A subheading ("Things I Like")
  • A bulleted list
  • Another subheading and paragraph
  • A clickable link to Google

โœ… Experiment Freely!

Change the text. Add more paragraphs. Break things on purpose and see what happens. You can't hurt anything โ€” it's just a file on your Desktop. This is the best way to learn: mess around and observe.

Notice the workflow here:

  1. Edit the file in Notepad
  2. Save
  3. Switch to browser
  4. Refresh
  5. Repeat

This edit-save-refresh cycle is how web development has worked since the beginning. The tools get better, but the loop stays the same.

Why This Approach Breaks Down

So if HTML is just text and Notepad can write text... why would you ever need anything else?

Great question. Let's talk about what goes wrong as soon as you try to build anything real:

๐Ÿ” No Syntax Highlighting

In Notepad, everything is the same color โ€” black text on white background. Tags, content, attributes, values โ€” it all looks the same. When your file is 10 lines long, this is fine. When it's 200 lines long, it becomes a nightmare. You can't tell your HTML tags from your actual content at a glance.

A proper code editor colors different parts of your code differently โ€” tags in one color, attributes in another, text content in another. This is called syntax highlighting, and it makes errors visible instantly.

โŒจ๏ธ No Auto-Complete

In Notepad, you have to type every single character yourself. Every opening tag, every closing tag, every attribute name and value, every angle bracket. Typos are inevitable, and a single missing > can break your entire page.

Code editors offer auto-complete: start typing a tag name, and the editor suggests the rest. It can automatically add closing tags, fill in required attributes, and even generate entire HTML structures with a few keystrokes.

๐Ÿ“ No File Management

Right now your file is sitting on your Desktop. What happens when you need:

  • Multiple HTML pages
  • A CSS file
  • An images folder
  • A clear project structure

Your Desktop becomes a mess. A code editor gives you a sidebar with your entire project folder, making it easy to navigate between files, create new ones, and keep everything organized.

๐Ÿ› No Error Detection

Notepad won't tell you if you forgot a closing tag, misspelled an attribute, or nested your elements incorrectly. You'll only find out when you load the page in a browser and something looks wrong โ€” and then you have to hunt for the mistake in a wall of monochrome text.

Code editors can underline errors in real time, before you even save the file.

๐Ÿ‘€ No Live Preview

With Notepad, you have to manually save, switch to your browser, and refresh every single time you make a change. That adds up fast.

Code editors can show you a live preview that updates automatically as you type.

๐Ÿ’ก The Bottom Line

Notepad can write HTML, the same way a butter knife can drive a screw. It technically works, but you'll strip the head, cut your hand, and hate the experience. The right tool makes all the difference.

The Point of This Exercise

So why did we do this if Notepad isn't the right tool? Two reasons:

1. Demystification

HTML is not magic. It's not compiled code, it's not encrypted, it's not binary. It's plain text that follows a specific format. Any text editor on any computer can create it. That's empowering โ€” you'll never feel locked into a specific tool or platform.

2. Motivation

When we install VS Code in the next lesson, you'll immediately feel the difference. Syntax highlighting, auto-complete, error detection, file management โ€” every feature will solve a problem you just experienced firsthand. You won't be installing a tool on faith; you'll be installing it because you know what life is like without it.

Keep your my-page.html file on your Desktop for now. In the next lesson, you'll open it in VS Code and see the difference immediately.

Summary

๐ŸŽ‰ Key Takeaways

  • HTML is plain text. You can write it in any text editor, including Notepad.
  • Saving a file with a .html extension tells your browser to render it as a web page.
  • The basic workflow is: edit โ†’ save โ†’ refresh browser.
  • Notepad works but lacks syntax highlighting, auto-complete, error detection, and file management.
  • A proper code editor solves all of these problems โ€” and you're about to install one.

๐Ÿงน Cleanup

Don't delete my-page.html from your Desktop yet! We'll use it in the next lesson to compare the Notepad experience with VS Code.

๐Ÿš€ What's Next?

In the next lesson, you'll install Visual Studio Code โ€” a free, powerful code editor used by millions of developers. You'll open your Notepad-made HTML file in it and immediately see why proper tooling matters. Then we'll set up a real project folder and start doing things the right way.