Thuta Learning
HTML
BasicWeb DevelopmentBeginner

HTML Home: how this course works

HTMLLesson 115 min

What you'll walk away with

  • Describe HTML as the language that gives web content structure and meaning, separate from CSS and JavaScript
  • Create an .html file in a text editor and open it in a browser
  • Name the five chapters of the course and what each one covers
  • Use the parts of every lesson (simple explanation, problem, example, challenge, quiz) to plan your study

Explain it simply

Explain it simply

Every web page you have ever opened is, underneath, a plain text file written in HTML. HTML does not decide colours or animations. Its job is to say what each piece of content is: this line is the page's main heading, these sentences form a paragraph, this text is a link to another page, this is a picture of a cat.

Think of building a house. HTML is the frame and the rooms, CSS is the paint and the furniture, and JavaScript is the electricity that makes things move and respond. You will spend this course on the frame, because every other layer is attached to it.

Problem → Why → Solution

The problem: a page that only looks right

Many beginners learn web pages by copying what they see. Once CSS makes the first line big and the last one look like a button, the code below can look fine in a browser.

But the browser has no idea the first line is a heading. A screen reader announces three plain lines of text, the "button" cannot be reached with the Tab key, and a search engine cannot tell what the page is about.

looks-right.html
<div class="title">Mingalaba Cafe</div>
<div>Open daily from 7:00</div>
<div class="btn" onclick="order()">Order now</div>

Why does this happen?

Appearance comes from CSS, and CSS can make anything look like anything. Meaning comes only from the HTML tags you choose: h1 says heading, and button says a control that can be focused and pressed with the keyboard. That is why this course teaches HTML as a language of meaning first and leaves the looks for later.

Core concept: HTML and the route through this course

HTML stands for HyperText Markup Language. "Markup" means you take ordinary text and wrap pieces of it in tags such as <h1> and </h1>. The browser reads the tags, works out what each piece is, and draws it with sensible default styles. "HyperText" refers to links: text that takes you to another document, which is the idea the whole web is built on.

You need only two tools: a text editor to write the file (Notepad works; VS Code is a free editor many developers use) and a web browser to open it. There is nothing to install or compile: save a file whose name ends in .html, double-click it, and the browser shows the page. Each time you edit and save, refresh the tab to see the change.

The course has 38 lessons in five chapters, and each chapter builds on the ones before it:

ChapterLessonsWhat you learn
Basic1-12how HTML and the browser work, document structure, elements, attributes, comments, headings, paragraphs, text formatting, line breaks, quotes
Intermediate13-24links, images and file paths, responsive images, lists, tables, and forms with inputs, labels and validation
Advanced25-32semantic layout elements, accessibility, SEO meta tags, video, audio, iframes, details and summary
Projects33-36a profile card, a landing section, a contact form and a final checklist
Exercises37-38two practice sets that mix everything together

Every lesson follows the same path: a plain-language explanation, a real problem the topic solves, the core concept, a worked example with a line-by-line breakdown, common mistakes, a mini challenge with a starter skeleton and a solution, and three quiz questions. Type the examples yourself instead of copying them; your fingers learn the shape of tags faster than your eyes do.

The write, save, refresh loop
  1. Write tags in a .html file
  2. Save it and open it in a browser
  3. Browser turns tags into a page tree
  4. The tree is drawn on the screen

Edit the file, save, refresh: that loop is how you will practise in every lesson.

General pattern of an element

html
<tagname>content</tagname>

<tagname attribute="value">content</tagname>

<voidtag attribute="value">

Most elements have a start tag, content and an end tag with a /. Attributes go inside the start tag as name="value". A few void elements, such as <br> and <img>, have no content and so no end tag. Lessons 5 and 6 cover these three shapes in detail.

Example: your first web page

This is a complete, minimal HTML document. Save it as index.html and open it in a browser. You do not need to understand every line yet; lesson 4 explains each part of the head one by one.

index.html
<!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>
</head>
<body>
  <h1>Hello, HTML!</h1>
  <p>This page is a plain text file that my browser turned into a web page.</p>
  <p>Next I will learn how the browser reads these tags.</p>
</body>
</html>

Code breakdown

  1. Line 1<!DOCTYPE html>

    Tells the browser to read the document by the modern standard. It is not a tag, and it appears once, at the very top of the file.

  2. Line 2<html lang="en">

    The root element that wraps the whole page. lang="en" says the content is English, so a screen reader uses the right pronunciation.

  3. Line 6<title>My first page</title>

    Not shown on the page itself; this is the name that appears on the browser tab, in bookmarks and in search results.

  4. Line 9<h1>Hello, HTML!</h1>

    The page's main heading. The browser draws it big and bold by default, but what h1 really means is "the top-level heading".

  5. Lines 10-11<p>Next I will learn how the browser reads these tags.</p>

    Each <p> is one paragraph. The browser starts every paragraph on a new line with space between them, so no <br> tags are needed.

You should see
The browser tab reads "My first page". The page shows a large bold heading "Hello, HTML!" followed by two ordinary paragraphs, each on its own line with space between them.

Set up a practice folder

1. Create a folder

Make a folder called html-practice on your Desktop or in Documents. Keep every example from this course inside it.

2. Open a new file in your editor

Open VS Code or Notepad and type the example above yourself.

3. Save it as index.html

In Notepad, change "Save as type" to "All files" first, otherwise .txt is added to the name.

4. Open it in a browser

Double-click the file or drag it into a browser window. The address bar shows a path starting with file:///.

5. Edit, save, refresh

Change a paragraph's text, save, then press F5 or Ctrl+R (Cmd+R on a Mac) in the browser. Ctrl+U shows the page source and F12 opens DevTools.

In real projects

Where HTML shows up in real projects

Every site you use, from a news site to an online shop to the web version of a banking app, sends HTML to the browser. Sites built with React, Vue or a WordPress theme still produce HTML in the end, because HTML is what the browser understands for page structure. To notice when a framework produces bad markup, you need to read HTML fluently.

HTML also appears outside web pages. Email newsletters are written in HTML, EPUB e-books contain XHTML files inside, and most documentation sites are generated as HTML. Front-end developers open the HTML tree in browser DevTools almost every day to track down bugs, and this course starts building that habit early.

Common mistakes

Common mistakes

1. Saving the file as index.html.txt

Windows hides file extensions by default, and Notepad can add .txt to the name. Open that file and the browser shows the raw tags as plain text instead of a page. Turn on "File name extensions" in File Explorer and choose "All files" when you save.

2. Writing HTML in Word or Google Docs

Word processors save formatted documents and turn straight " quotes into curly ones. The browser does not accept curly quotes as the start and end of an attribute value, so attributes break. Use a plain text editor.

3. Refreshing without saving, or refreshing the wrong file

The browser only shows the version saved on disk. If the page does not change, check the editor tab for an unsaved marker and check that the path in the address bar is the file you are editing; mixing up two copies is very common.

Mini challenge

Mini challenge: your own first page

Fill in the TODOs in the starter skeleton to build a page that introduces you, then open it in a browser.

  • Include a doctype, an html element with a lang attribute, a charset meta and a viewport meta
  • Put your name in the title and check that it appears on the browser tab
  • Add one h1 with your name
  • Add two paragraphs: where you are from and why you are learning HTML
about-me.html
<!DOCTYPE html>
<!-- TODO: open the html element with a lang attribute -->
<head>
  <!-- TODO: character encoding meta -->
  <!-- TODO: viewport meta -->
  <!-- TODO: a title with your name -->
</head>
<body>
  <!-- TODO: one h1 with your name -->
  <!-- TODO: a paragraph about where you are from -->
  <!-- TODO: a paragraph about why you are learning HTML -->
</body>
<!-- TODO: close the html element -->

Expected: The browser tab shows a title with your name, and the page shows your name as a large heading with two paragraphs below it.

Show hint

Use the example as a guide for the shape, but type every line yourself. After each save, refresh the browser and check the tab title.

Show solution
about-me.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Aye Aye - About me</title>
</head>
<body>
  <h1>Aye Aye</h1>
  <p>I live in Mandalay, Myanmar.</p>
  <p>I am learning HTML so I can build a website for my family's tea shop.</p>
</body>
</html>

Quick quiz 1 / 3

You save a file as notes.html.txt and double-click it. What will you most likely see?

Quick quiz 2 / 3

Which layer of a web page decides that a line of text is the page's main heading?

Quick quiz 3 / 3

In which chapter do you first learn input types, labels and validation?

What to remember

  • HTML says what each piece of content is; CSS controls the looks and JavaScript the behaviour.
  • A text editor and a browser are all you need: save an .html file, open it, edit and refresh.
  • The course has 38 lessons in five chapters: Basic, Intermediate, Advanced, Projects and Exercises.
  • Every lesson ends with a challenge and a quiz, so type the examples yourself and practise.

HTML Living Standard — WHATWG

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

HTML Home: how this course works | Thuta Learning