On this page10 sections
  1. Learning Objectives
  2. 1. HTML in One Sentence
  3. 2. "Markup" Means Labels
  4. 3. HTML, CSS and JavaScript
  5. 4. How a Browser Shows a Page
  6. 5. A Complete Mini Page
  7. Common Beginner Mistakes
  8. Practice Questions
  9. Practice Answers
  10. Key Takeaways

Lecture 001: What Is HTML?

Category1: Getting Started
Lecture001 of 048
Estimated video length8 min
TargetHTML5 · any modern browser
LevelBeginner

Every web page you have ever opened is built from HTML. It is not a programming language with loops and maths. It is a way of labelling content so the browser knows what each piece is: "this is a heading", "this is a paragraph", "this is a link".


Learning Objectives

By the end of this lecture you will be able to:

  • Explain what HTML is and what it is used for
  • Describe how HTML, CSS and JavaScript work together
  • Read a tiny HTML page and say what each part does
  • Run HTML in the browser and change it

1. HTML in One Sentence

HTML stands for HyperText Markup Language. You write plain text and wrap parts of it in tags that describe what they are. The browser reads those tags and draws the page.

Example

html
<h1>My Hobbies</h1>
<p>I like football, cooking and reading.</p>

Press ▶ Run above. The browser shows the first line as a big, bold heading and the second as a normal paragraph. That is all HTML does: it tells the browser what each piece of content is.


2. "Markup" Means Labels

A word processor makes text bold when you press a button. In HTML you say it with a tag instead. The tag is the label; the text between the tags is the content.

Example

html
<p>This sentence has one <strong>very important</strong> word.</p>

<strong> means "this text is important". Browsers show it in bold.


3. HTML, CSS and JavaScript

A web page is usually made of three languages, each with one job:

LanguageJobThink of it as…
HTMLThe content and its structureThe walls and rooms of a house
CSSHow it looks: colours, fonts, layoutThe paint and furniture
JavaScriptWhat it does when you click or typeThe electricity and switches

This course is about HTML. The CSS course comes next, and it styles the pages you build here.

Example: the same HTML, with a little CSS added:

html
<h1 style="color: teal;">My Hobbies</h1>
<p>I like football, cooking and reading.</p>

The words did not change. Only the look did. That is the split: HTML for meaning, CSS for looks.


4. How a Browser Shows a Page

  1. You type an address, such as example.com.
  2. The server sends back a file of HTML text.
  3. The browser reads the tags from top to bottom and draws each one.

Because HTML is plain text, you can open any page and see its HTML. In most browsers, right-click a page and choose View Page Source.


5. A Complete Mini Page

Example

html
<!DOCTYPE html>
<html>
  <head>
    <title>About Me</title>
  </head>
  <body>
    <h1>Hi, I'm Sara</h1>
    <p>I am learning HTML, one topic at a time.</p>
  </body>
</html>

Don't worry about every line yet. Lecture 002 walks through each one. For now, notice that the page is just nested tags, each describing a part of the page.


Common Beginner Mistakes

1. Thinking HTML decides the look. HTML says what something is. Colours and sizes are CSS's job, even though browsers give headings a default size.

2. Calling HTML a programming language. It has no variables or loops. It is a markup language, and that is exactly why it is easy to start with.

3. Being afraid of breaking something. You can't damage anything by editing HTML. Change the examples, press Run, and see what happens.


Practice Questions

  1. What does HTML stand for?
  2. What is the job of HTML, compared with CSS?
  3. Which language would you use to make a button do something when clicked?
  4. In <p>Hello</p>, which part is the tag and which part is the content?
  5. How can you see the HTML of any web page?

Practice Answers

  1. HyperText Markup Language.
  2. HTML describes the content and its structure; CSS controls how that content looks.
  3. JavaScript.
  4. <p> and </p> are the tags; Hello is the content.
  5. Right-click the page and choose View Page Source (or press Ctrl+U / ⌘⌥U).

Key Takeaways

  • HTML labels content so the browser knows what each part is.
  • Tags such as <h1> and <p> wrap the content they describe.
  • HTML = structure, CSS = looks, JavaScript = behaviour.
  • A page is plain text, so you can always read and edit it.