HTML Tutorial
The structure of every web page. Learn elements, forms, semantics, SEO and accessibility.
- Topics
- 22
- Full lessons
- 22
- Est. hours
- ~4
- Interview Qs
- 29
Overview
HTML (HyperText Markup Language) describes the structure and meaning of content on the web. Browsers read HTML and build the Document Object Model (DOM) that CSS styles and JavaScript manipulates.
This track starts with your very first page and ends with semantic, accessible, search-friendly markup you would be comfortable shipping to production.
What you will learn
- Write valid, well-structured documents
- Build accessible forms with native validation
- Use semantic elements that help users and search engines
- Embed images, audio, video and iframes responsibly
Prerequisites
None — this track starts from the very beginning.
Learning path
The recommended sequence, from beginner to advanced. Each stage builds on the one before.
- 1Getting Started · 5 topics · BeginnerIntroduction to HTML · HTML Document Structure · HTML Elements and Tags · Headings and Paragraphs · Attributes
- 2Content · 4 topics · BeginnerLinks and Navigation · Images · Lists · Tables
- 3Forms · 3 topics · Beginner → IntermediateForms · Input Types · Form Validation
- 4Modern HTML · 4 topics · IntermediateSemantic HTML · Audio and Video · HTML5 Features · Iframes
- 5Production · 4 topics · Intermediate → AdvancedMeta Tags · SEO-Friendly HTML · Accessibility · HTML Best Practices
- 6Practice · 2 topics · AdvancedMini Projects · HTML Interview Questions
Complete topic list
22 topicsGetting Started
5 topics- Introduction to HTMLBeginner5m
- HTML Document StructureBeginner5m
- HTML Elements and TagsBeginner5m
- Headings and ParagraphsBeginner5m
- AttributesBeginner5m
Content
4 topics- Links and NavigationBeginner5m
- ImagesBeginner5m
- ListsBeginner5m
- TablesBeginner5m
Forms
3 topics- FormsBeginner5m
- Input TypesIntermediate5m
- Form ValidationIntermediate5m
Modern HTML
4 topics- Semantic HTMLIntermediate5m
- Audio and VideoIntermediate5m
- HTML5 FeaturesIntermediate5m
- IframesIntermediate5m
Production
4 topics- Meta TagsIntermediate5m
- SEO-Friendly HTMLAdvanced5m
- AccessibilityAdvanced6m
- HTML Best PracticesAdvanced5m
Practice
2 topics- Mini ProjectsAdvanced5m
- HTML Interview QuestionsAdvanced15m
Code example
A taste of the track, from Introduction to HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Page</title>
</head>
<body>
<h1>Hello, Techie Babaji!</h1>
<p>This is my <strong>first</strong> web page.</p>
<a href="https://developer.mozilla.org">Learn more on MDN</a>
</body>
</html>
A page with a large heading, a paragraph with the word “first” in bold, and a clickable link.
Practice exercises
Create a page about your favourite programming language. Include an h1, two paragraphs and a link to its official website.
Write a complete HTML document from memory with the title “My Hobbies”, a heading and a short paragraph about one hobby.
Write a paragraph that says “HTML is easy and fun” where “easy” is important (strong) and “fun” is emphasised (em). Add a horizontal rule below it.
Create a mini recipe page: an h1 recipe name, an h2 “Ingredients”, an h2 “Method”, and a paragraph under each. Make one word important.
Create a link with id "home-link" and class "nav", pointing to https://example.com, that opens in a new tab safely.
Build a nav with links to index.html, blog.html and an external GitHub profile that opens in a new tab.
Show all 21 exercises
Add an image of a cat (use https://placecats.com/300/200) with good alt text, fixed dimensions, lazy loading and a caption.
Make an ordered list of 3 steps to start a computer, where step 2 has a nested unordered list of two sub-points.
Create a 3-day weekly timetable with a caption. The first column should be row headers (days) and one cell should span two columns for “Holiday”.
Build a login form that POSTs to /login with a username, a password, a “remember me” checkbox and a submit button. Link all labels.
Build a hotel booking form with check-in and check-out dates, number of guests (1–6) and an email address.
Add a password field that is required, at least 8 characters long, and a “confirm password” field.
Convert this layout to semantic HTML: <div class="top"><div class="menu">…</div></div><div class="content">…</div><div class="bottom">…</div>
Embed the MDN flower video so it shows controls, is 300px wide, has a poster and loads only metadata.
Create an FAQ with three <details> questions, the first one open by default.
Embed https://example.com in a responsive, lazy-loaded iframe with a title, allowing scripts but nothing else.
Write the <head> for a blog post called “10 Tips for Learning CSS”, including description, canonical and Open Graph title/image.
Fix this for SEO: <div class="big">Shoes</div><img src="s.jpg"><a href="/sale">click here</a>
Make this accessible: <div onclick="search()"><img src="search.svg"></div>
List three problems in: <html><body><div onclick="go()" style="font-size:30px">Welcome</div><a href="x" target="_blank">here</a></body></html>
Build Project 3: a product card for “Wireless Earbuds” priced ₹1,999 with three features and an Add to cart button.
Common interview questions
- What is semantic HTML and why does it matter?
- What does <!DOCTYPE html> do?
- What is the difference between block and inline elements?
- Why is the alt attribute important on images?
- What is the difference between <strong> and <b>?
- What is HTML, and is it a programming language?
- What are void (empty) elements?
- What is the difference between the id and class attributes?
- Absolute vs relative URLs — when do you use each?
- When should you use ul, ol and dl?
- When should you use a table, and how do you make it accessible?
- Is HTML form validation enough to protect your server?
- What does the viewport meta tag do?
- How do you make a form accessible?
- What is the purpose of data-* attributes?
- GET vs POST for a form — how do you choose?
- Why does every input need a label, and how do you connect them?
- Name some HTML5 input types and what they give you for free.
- How do you serve responsive images?
- What is ARIA, and when should you use it?
- section vs article vs div?
- How do you embed a video with captions and a fallback?
- What are async and defer on script tags?
- How do iframes affect security, and how do you sandbox them?
- Which meta and link tags matter most for SEO and sharing?
- What blocks rendering when a browser loads an HTML page?
- Why is <div onclick> worse than <button>?
- What does the <dialog> element give you?
- How do you lazy-load images and iframes without JavaScript?