In this lesson you will
- Explain what HTML does and what it does not do
- Write a valid page skeleton from memory
- Tell elements, tags and attributes apart
Elements, tags and attributes
A tag is the text in angle brackets. <p> opens a paragraph and </p> closes it; the closing tag has a slash. The opening tag, the content and the closing tag together make an element. Elements can sit inside other elements, which is called nesting: <p>This is <strong>important</strong>.</p> puts a strong element inside a paragraph.
Some elements have no content and no closing tag. They are called void elements; <br> (a line break), <img> (an image) and <meta> are common ones. You may see them written as <br /> in older code: the slash is allowed but does nothing in HTML.
Attributes add extra information to an element. They go inside the opening tag as name="value". For example <a href="https://needmytools.com"> tells a link where to go, and <html lang="en"> tells the browser the page is in English. Always put attribute values in quotes; it avoids bugs when a value contains a space.
Console
- Console messages, errors, form data and clicked links appear here.
Change the text between the tags and watch the result update. Clicking the link in the preview is logged in the console instead of leaving the page.
Sign in free to read the full lesson
You are reading the free preview. Create a free account (it takes one minute, no password) to unlock the rest of this lesson and track your progress.
Unlocks after sign-in:
- 2 more sections with live code examples
- Common mistakes to avoid
- Hands-on coding exercise with automatic checks
- Practice quiz and the graded lesson test
Free forever. No card, no paywall.
Questions people ask
Is HTML a programming language?
No. HTML is a markup language: it labels content but has no variables, conditions or loops. You add logic with JavaScript, and many people still call writing HTML "coding" in everyday speech.
What software do I need to start writing HTML?
Only a browser and a text editor. The editor on this page is enough to learn. When you work on files, free editors such as Visual Studio Code add colour, autocomplete and error hints.
Are HTML tags case-sensitive?
No, <P> and <p> work the same in HTML. Lowercase is the common convention and is what most style guides and tools expect, so use lowercase.
What is the difference between HTML and HTML5?
HTML5 was the name of a major version. Today HTML is a "living standard" maintained by WHATWG and updated continuously, so there is no HTML6 to wait for. When people say HTML5 they usually mean modern HTML.
How long does it take to learn HTML?
The basics in this course take a few evenings: about two hours of reading plus practice. Writing clean, accessible HTML well takes longer and comes from building real pages, which is what the exercises are for.
Sources
Facts in this lesson were checked against these official pages on 20 October 2026.
- MDN: Basic HTML syntax
- WHATWG HTML Living Standard: The HTML syntax
- MDN: Quirks mode and standards mode
- W3C Nu HTML Checker
Code examples stay in English and run in a sandbox on your device. If you spot a mistake, tell us through the contact page.