What is HTML?
How a browser turns markup into a page.
HTML (HyperText Markup Language) describes the structure of a page. A browser reads an HTML document from top to bottom and builds a tree of elements called the DOM, then paints it on screen.
Every HTML element is written as a tag, usually paired with a closing tag:
<p>This is a paragraph.</p>The browser doesn't care about indentation or line breaks in your source — it only cares about the tags and the text between them.
Tags describe what something is, not how it looks. Visual styling is CSS's job, not HTML's.
Building a minimal page
Declare the document type
Every HTML file starts with
<!DOCTYPE html>, which tells the browser to use modern rendering rules.Add the html and head elements
<html>wraps the whole document.<head>holds metadata the visitor never sees directly, like the page title.Add the body
<body>holds everything the visitor actually sees: text, images, buttons, forms.
You can open any web page, right-click, and choose Inspect to see its HTML tree live in your browser's dev tools.
Question 1 of 2
Which element holds the content a visitor actually sees?
Question 2 of 2
Which of these are HTML’s job? Select all that apply.
Try it yourself
Edit the HTML, CSS, and JS below, then press Run to see the result.
Files
Press Escape, then Tab, to move on from the editor.
Preview
Preview stopped.
Press Run to preview your code.
Console
No output yet.
Challenge
Add a level-one heading with the id title containing the text Hello, HTML.
Files
Press Escape, then Tab, to move on from the editor.
Preview
Preview stopped.
Press Run to preview your code.
Console
No output yet.