It holds the page up
Search tools, screen readers, and browsers all read the structure you write. Clear HTML elements make the rest of the page easier to style and easier to find.
Every website you open starts as HTML. This tutorial shows how that plain text becomes headings, links, forms, and pictures a browser can display.

HTML stands for HyperText Markup Language. It is the language that describes the structure of a web page. You label each piece of content, and the browser uses those labels to build what people see.
HTML is a markup language. It describes content. A programming language such as JavaScript runs instructions and makes decisions. HTML tells the browser, “this is a heading,” “this is a paragraph,” and “this is a link.”
The foundation under every site. News, shops, docs, and web apps all send HTML to the browser. CSS paints that structure. JavaScript makes it react. The page still starts with HTML elements.
HTML for beginners is a short climb with a wide view. A few tags are enough to publish a real page, and every later web skill attaches to those tags.
Search tools, screen readers, and browsers all read the structure you write. Clear HTML elements make the rest of the page easier to style and easier to find.
Save a file that ends in .html and open it in a browser. There is no compile step and no account required for local practice.
Styles select HTML elements. Scripts update them. If the structure is solid, presentation and behavior have something reliable to attach to.
Websites, email layouts, in-app help, and documentation all use HTML tags. Learning it once pays off across the work.
You write text. The browser turns HTML tags into a tree of elements called the DOM, the Document Object Model, then paints that tree on screen.
Create a text file and save it with an .html extension.
The browser reads the tags and builds a tree of HTML elements.
It loads the CSS, images, and scripts your HTML points to.
The page appears. JavaScript can change the tree later.
Browsers are forgiving. A missing end tag may still display. Write the tags anyway. Predictable HTML elements are easier to style, test, and share.
A modern page has a doctype, a root <html> element, a <head> for metadata, and a <body> for everything people see. Choose a part of the diagram to see its job.
Choose any box. The panel explains that part of the document.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page title</title>
</head>
<body>
<header>...</header>
<nav aria-label="Primary">...</nav>
<main>...</main>
<footer>...</footer>
</body>
</html> A heading is a rank, and a font size is a style. Use one <h1> for the page title, then <h2> and <h3> in order. Change the size later with CSS.
An HTML attribute adds a fact to the start tag. It does not replace the element. The name and the value usually look like name="value".
<a href="/html/basic">Continue the HTML tutorial</a>
<img
src="bike.jpg"
alt="Red bicycle beside a cafe window"
width="640"
height="480">
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email" required> | Attribute | What it tells the browser |
|---|---|
href | Where a link goes |
src | Which image, audio, or video file to load |
alt | The text alternative when an image cannot be seen |
lang | The language of the page or a phrase |
class and id | Names that CSS and JavaScript can find later |
for and id | Which label belongs to which form control |
required is a boolean attribute. Its presence turns the check on, so you can write required on its own. Attributes such as class, id, lang, and hidden are global: they fit almost any element. Others, such as href, belong to specific elements. The attributes reference sorts them out.
Write the text alternative on purpose. A useful alt describes the picture. A decorative picture gets an empty alt="". Leaving alt off can make assistive technology read the file name instead.
Modern HTML, the feature set people still call HTML5, gives you meaningful regions, links, forms, and media without a plugin.
<header>, <nav>, <main>, <article>, <section>, <aside>, and <footer> describe regions. Meaning travels with the content.
The <a> element is the “hyper” in HyperText. One attribute, href, connects this page to the next.
Labels, inputs, and buttons collect information. Types such as email, and attributes such as required, give you browser checks before any script runs.
<img>, <picture>, <audio>, and <video> embed pictures and recordings. <canvas> is there when you need to draw.
The right element carries keyboard behavior and a role. A <button> is a button. A <a href> is a link. Extra attributes fill the gaps, such as alt and label.
The same HTML tags work in Chrome, Firefox, Safari, and Edge. You practice locally, then publish the file when you are ready.
HTML used to ship as frozen, numbered documents. The language you are learning now is a living standard: browsers follow the current specification, and new features arrive there.
Tim Berners-Lee introduced HTML so documents could link to each other.
A finished specification. Pages from this era often mixed structure with presentation.
The feature generation behind today’s habits: semantic elements, audio, video, canvas, and richer forms. The name stuck.
The specification browsers implement. The WHATWG updates it as the web gains features. There is no HTML6 you need to wait for.
When a tutorial says HTML5, it usually means this modern style: <!DOCTYPE html>, semantic elements, and native media. Write that way and you are writing the living standard. Leave obsolete tags such as font and center in the deprecated list.
HTML structures the pieces people use: navigation, forms, pictures, and video. Switch the examples, then open the matching lesson when you want the full tour.
Leave the field empty and press Subscribe. The browser checks type="email" and required before any script runs.
<form action="/subscribe" method="post"> <label for="email">Email</label> <input id="email" name="email" type="email" autocomplete="email" required> <button type="submit">Subscribe</button> </form>
Red bicycle beside a cafe window
<img src="bike.jpg" alt="Red bicycle beside a cafe window" width="640" height="480">
The controls attribute asks the browser for its own player. Text inside <video> is the fallback.
<video controls width="640"> <source src="lesson.mp4" type="video/mp4"> Your browser does not show this video. Read the transcript instead. </video>
Labels, inputs, and buttons that collect information.
Pictures with src, alt, and responsive markup.
Audio and video with native controls.
Bullets, numbers, and description lists.
Rows and columns for data, with captions and headers.
A drawing surface for graphics when elements are not enough.
Each language has one job. Pages feel polished when you let each one do that job.
HTML
Names the content: headings, links, forms, and images.
<h1>Hello</h1>CSS
Sets color, type, spacing, and layout.
h1 { color: navy; }JavaScript
Reacts to people, updates the page, and loads data.
button.addEventListener(...)| Question | HTML | CSS | JavaScript |
|---|---|---|---|
| Job | Structure and meaning | Look and layout | Behavior |
| You write | HTML elements and text | Rules that select those elements | Scripts that respond to events |
| Usual file | .html | .css | .js |
| Reach for it when | You add or organize content | You change how something looks | The page should react or fetch data |
This HTML tutorial stays on structure. When you are ready, connect a stylesheet in Add CSS to HTML and a script in JavaScript in HTML.
This page is the map. Each card opens a part of the HTML tutorial, from the first skeleton to forms, media, CSS, and JavaScript.
The first real page
Document skeleton, headings, paragraphs, lists, and links you can save and open.
Where you type
Pick a text editor, preview a file, and leave comments the browser hides.
The element reference
Look up HTML elements one tag at a time, including the semantic regions used on this page.
Facts on the start tag
href, src, alt, class, id, and the global attributes you will reuse everywhere.
Head, text, lists, tables
Metadata in the head, then text, lists, and tables in the body.
Input and pictures
Build forms, then add images, audio, and video.
Presentation
Link a stylesheet so color, type, and layout stay out of the HTML elements.
Behavior
Add a script when the page should respond. The HTML stays the structure underneath.
Follow the steps in order. Each one assumes the step before it, and you can pause to practice a single page.
You are here: what HTML is, and how a document fits together.
Write a complete starter page and open it in a browser.
Choose a tool, then leave notes with HTML comments.
Study elements and the attributes that configure them.
Head metadata, text, lists, and tables. Special characters are covered in entities.
Collect input, then add images, audio, and video.
Attach CSS, then add JavaScript when the page should react.
Move on to the CSS tutorial and the JavaScript tutorial with HTML already in place.
You can start this HTML tutorial today. Nothing else has to be installed first.
Save this as index.html and open it in a browser. It uses the document shape from this page: a doctype, metadata, and semantic regions.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
</head>
<body>
<header>
<h1>Hello, HTML</h1>
<p>This page is built with HTML elements.</p>
</header>
<nav aria-label="On this page">
<a href="#about">About</a>
</nav>
<main id="about">
<h2>Why this works</h2>
<ul>
<li>The doctype selects modern HTML.</li>
<li>The heading and list describe the content.</li>
<li>The link is real hypertext.</li>
</ul>
</main>
<footer>
<p>Save this file as index.html and open it in a browser.</p>
</footer>
</body>
</html> <!DOCTYPE html> on the first line.h1.alt and every control a <label>.h1 only because the text looks bigger.div when a semantic element fits.alt, or using the file name as the description.font and center for layout.An HTML document starts with <!DOCTYPE html>. Semantic elements such as <header>, <nav>, <main>, and <footer> name the regions of the page. Continue with HTML Basic.
Build the same skeleton with headings, lists, and links you can practice in the editor.
14 people found this page helpful