On this page10 sections
Lecture 001: What Is HTML?
| Category | 1: Getting Started |
| Lecture | 001 of 048 |
| Estimated video length | 8 min |
| Target | HTML5 · any modern browser |
| Level | Beginner |
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
<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
<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:
| Language | Job | Think of it as… |
|---|---|---|
| HTML | The content and its structure | The walls and rooms of a house |
| CSS | How it looks: colours, fonts, layout | The paint and furniture |
| JavaScript | What it does when you click or type | The 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:
<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
- You type an address, such as
example.com. - The server sends back a file of HTML text.
- 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
<!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
- What does HTML stand for?
- What is the job of HTML, compared with CSS?
- Which language would you use to make a button do something when clicked?
- In
<p>Hello</p>, which part is the tag and which part is the content? - How can you see the HTML of any web page?
Practice Answers
- HyperText Markup Language.
- HTML describes the content and its structure; CSS controls how that content looks.
- JavaScript.
<p>and</p>are the tags;Hellois the content.- 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.