HTML Complete Master Guide
HTML Complete Master Guide
HTML
COMPLETE MASTER GUIDE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Beginner to Advanced • HTML5 • Frontend Development
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Perfect For:
Students • Job Seekers • Bootcamp Learners • Self-Learners • Software Engineers
Professional Edition | 2025
Modern HTML5 • Web Standards • Accessibility • SEO
📖 Reading Order
Follow the chapters in order if you are a complete beginner. Each chapter builds on the previous one. If
you are revising specific topics, jump directly to the chapter you need.
🎨 Colour Legend
Colour Meaning
Blue Text HTML keywords, definitions, and key concepts
Orange Text HTML tags (e.g. <html>, <body>, <div>)
Purple Text HTML attributes (e.g. class, id, src)
Green Text Attribute values (e.g. "center", "submit")
Dark Background Code blocks — copy and practise these
💡 TIP BOX
Green boxes contain pro tips that will save you time.
⚠️ WARNING BOX
Red/yellow boxes warn you about common mistakes.
🎯 INTERVIEW QUESTIONS
Purple boxes contain real interview questions from companies.
🚀 BEST PRACTICE
Cyan boxes show the professional way to write code.
CHAPTER 01
Introduction to HTML
What is HTML? How does the web work? Let's find out!
Every website you have ever visited — Google, YouTube, Amazon, Instagram — is built using HTML at
its core. HTML tells the browser: "Here is a heading", "Here is a paragraph", "Here is an image", "Here
is a button".
HTML is NOT a programming language. It is a markup language. The difference is:
• Programming languages perform logic: if, loops, calculations.
• Markup languages describe and structure content.
Year Milestone
1991 Tim Berners-Lee creates HTML at CERN. Only 18 tags existed.
1993 HTML 1.0 — basic text, links, images.
1995 HTML 2.0 — first official standard. Added forms.
1997 HTML 3.2 — tables, scripting, applets added.
1999 HTML 4.01 — style sheets (CSS) separation. Still used today.
2000–2006 XHTML — stricter version of HTML based on XML.
💡 PRO TIP
DNS stands for Domain Name System. Think of it like a phone book for the internet.
It converts human-readable names ([Link]) into computer-readable IP addresses.
Term Meaning
CLIENT Your browser (Chrome, Firefox, Safari). It REQUESTS web
pages.
SERVER A powerful computer that STORES and SENDS web pages.
REQUEST The message your browser sends to the server asking for a
page.
RESPONSE The HTML, CSS, and JavaScript the server sends back.
HTTP/HTTPS The protocol (language) used for web communication.
Imagine your HTML is a family tree. The <html> tag is the grandparent. Inside it are two children:
<head> and <body>. Inside <body> are many children like <h1>, <p>, <img>. The browser builds this
tree structure to understand your page.
📌 IMPORTANT NOTE
Modern browsers use rendering engines to convert HTML to pixels:
Chrome and Edge use 'Blink'
Firefox uses 'Gecko'
Safari uses 'WebKit'
Different engines may occasionally display pages slightly differently.
Term Definition
URL Uniform Resource Locator — the address of a web page (e.g.
[Link]
Domain The human-readable name of a website (e.g. [Link],
[Link])
Web Hosting A service that stores your website files on a server accessible to
everyone
IP Address A unique number identifying a server (e.g. [Link])
Browser Software that displays web pages (Chrome, Firefox, Safari,
Edge)
HTML File A text file ending in .html that contains HTML code
Frontend The part of a website users see (HTML, CSS, JavaScript)
Backend The server side that processes data ([Link], Python, Java,
PHP)
⚠️ WARNING
HTML alone cannot make a website interactive or styled.
You will need CSS for design and JavaScript for behaviour.
But HTML is ALWAYS the starting point. Master it first!
❓ QUICK QUIZ
Q1. What does HTML stand for?
Q2. Who created HTML and in which year?
Q3. What is the difference between HTML and HTML5?
🎯 INTERVIEW QUESTIONS
What is HTML? Why is it called a markup language?
Explain the difference between HTML and HTML5 with at least 3 examples.
What is the DOM? How does the browser build it?
What is the difference between client-side and server-side?
What is a rendering engine? Name two examples.
Chapter 1 Summary
• HTML = HyperText Markup Language — the structure of every web page.
• Created by Tim Berners-Lee in 1991. HTML5 is the current version (2014+).
• HTML is NOT a programming language — it is a markup language.
• When you visit a website, your browser requests HTML from a server.
• The browser parses HTML and builds a DOM tree to display the page.
• Key terms: URL, Domain, Web Hosting, Client, Server, Frontend, Backend.
CHAPTER 02
Tool Purpose
Code Editor A program where you write your HTML code (like VS Code)
Web Browser A program that displays your HTML page (Chrome is
recommended)
That is it! Unlike many programming languages, you do NOT need to install anything complex. HTML
runs directly in the browser.
Why VS Code?
• Completely free and open source
• Works on Windows, Mac, and Linux
• Has colour-coding (syntax highlighting) for HTML
• Has extensions to make coding faster
• Has a built-in terminal
• Trusted by professional developers worldwide
Installation Steps
14. Go to [Link] in your browser
15. Click the big Download button for your operating system
16. Open the downloaded file and follow the installation wizard
17. Click Next → Next → Install → Finish
18. Open VS Code from your Desktop or Start Menu
💡 PRO TIP
Download the Stable Build version, not Insiders, for a more reliable experience.
📌 IMPORTANT NOTE
The most important extension is Live Server.
It automatically updates your browser every time you save your HTML file.
This saves you from manually refreshing the browser hundreds of times!
my-website/
├── [Link] ← Main home page
├── [Link] ← About page
├── [Link] ← Contact page
├── css/
│ └── [Link] ← All your styles
├── js/
│ └── [Link] ← All your JavaScript
└── images/
├── [Link]
└── [Link]
💡 PRO TIP
You can also click the 'Go Live' button at the very bottom right of VS Code to start Live Server.
Network Shows all files loaded by the page (HTML, CSS, images, JS).
Sources Shows the source code files of the page.
Application Shows cookies, localStorage, and session storage.
🚀 BEST PRACTICE
Get into the habit of using Developer Tools from Day 1.
Inspect other websites to learn how they are built!
Right-click on ANY web page → Inspect → look at the HTML. This is how many developers learn.
💡 PRO TIP
Type ! and press Tab in an empty .html file — VS Code will auto-generate a complete HTML
boilerplate for you!
❓ QUICK QUIZ
Q1. What are the two minimum tools needed to write HTML?
Q2. What does Live Server do?
Q3. How do you open Developer Tools in a browser?
Q4. What is the shortcut to format code in VS Code?
Q5. What is the name of the main/home page HTML file by convention?
Chapter 2 Summary
• You only need a Code Editor (VS Code) and a Browser (Chrome) to write HTML.
CHAPTER 03
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first web page.</p>
</body>
</html>
⚠️ WARNING
Always put <!DOCTYPE html> as the very FIRST line of every HTML file.
Without it, browsers may enter 'quirks mode' and display your page incorrectly.
<body> The body element contains all the visible content of the HTML page.
<br>
<hr>
<input type="text">
Part Example
Opening Tag <h1>
Closing Tag </h1> — note the forward slash /
Content The text or elements between the tags
Attribute Extra information inside the opening tag: href="...", src="..."
Self-Closing Tags that do not need a closing tag: <br> <img> <hr> <input>
<!-- This is a comment. The browser will NOT display this. -->
<!--
This is a
multi-line comment
-->
💡 PRO TIP
Use Ctrl+/ (Windows) or Cmd+/ (Mac) in VS Code to quickly toggle a comment.
Comments are very useful for leaving notes when working in a team.
<head>
<!-- Character Encoding (always include this) -->
<meta charset="UTF-8">
<head>
<title>My Website</title>
📌 IMPORTANT NOTE
Favicon files are usually 16x16 or 32x32 pixels.
Common formats: .ico, .png, .svg
Put your [Link] in the root folder (same level as [Link]) for it to work automatically.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="My first HTML web page - learning HTML
basics">
<meta name="author" content="Your Name">
<title>My First Web Page | HTML Learning</title>
<link rel="icon" type="image/png" href="[Link]">
</head>
<body>
</body>
</html>
🚀 BEST PRACTICE
Always indent nested elements with 2 spaces for readability.
Write one element per line.
Use lowercase for all tag names: <body> not <BODY>.
Always close your tags: </p> </div> </html>
Save files with the .html extension.
❓ QUICK QUIZ
Q1. What does <!DOCTYPE html> do?
Q2. What is the difference between <head> and <body>?
Q3. What is the purpose of the charset meta tag?
Q4. How do you write a comment in HTML?
Q5. What is a favicon?
Q6. What does the viewport meta tag do?
Q7. Is the <html> tag required? Why?
🎯 INTERVIEW QUESTIONS
Explain the complete structure of an HTML document.
What is the purpose of <!DOCTYPE html>? What happens if you omit it?
What are meta tags? List the most important ones.
What does the viewport meta tag do and why is it important?
What is the difference between the <head> and <body> tags?
Chapter 3 Summary
• Every HTML page starts with <!DOCTYPE html> to declare HTML5.
• The <html> tag is the root — everything goes inside it.
• <head> contains metadata (title, charset, viewport) not visible to users.
• <body> contains everything the user sees on the page.
• Tags come in pairs: <p>content</p>. Some are self-closing: <br> <img>.
• Attributes add extra info to tags: <img src="..." alt="...">.
• Comments: <!-- This is a comment --> — hidden from users.
• Meta tags help with SEO, character encoding, and responsiveness.
CHAPTER 04
HTML Elements
Block, Inline, Empty, Nested — understanding every type
Block Elements
Block elements start on a NEW LINE and take up the FULL width available — like a box that stretches
across the entire page.
Inline Elements
Inline elements do NOT start on a new line. They only take up as much space as their content — like
words flowing in a sentence.
<!-- The <strong> and <a> stay inside the paragraph line -->
📌 IMPORTANT NOTE
Golden Rule: Block elements can contain inline elements.
Inline elements should NOT contain block elements.
Correct: <p>Text with <strong>bold</strong> word</p>
WRONG: <span><p>Paragraph inside span</p></span> ← NEVER do this
💡 PRO TIP
In HTML5, you do NOT need to self-close void elements: <br> is fine.
In older XHTML style, you would write <br /> — both work in modern browsers.
⚠️ WARNING
WRONG nesting (overlapping tags) — NEVER do this:
<p><strong>Bold text</p></strong>
CORRECT nesting:
<p><strong>Bold text</strong></p>
🚀 BEST PRACTICE
Use <div> for layout sections and grouping.
Use <span> for styling small portions of text.
Prefer semantic HTML5 tags (<section>, <article>) over <div> where possible.
Give every div a meaningful class name: class="hero-section" not class="div1".
Attribute Purpose
❓ QUICK QUIZ
Q1. What is the difference between a block element and an inline element?
Q2. Give 3 examples of block elements and 3 examples of inline elements.
Q3. What is a void/empty element? Give 3 examples.
Q4. What does nesting mean in HTML?
Q5. What is the difference between <div> and <span>?
Q6. What are HTML attributes? Give 3 examples.
🎯 INTERVIEW QUESTIONS
Explain block-level vs inline elements with examples.
What are void elements in HTML? List at least 5.
What is the difference between id and class attributes?
Can you put a <div> inside a <span>? Explain.
What are global attributes in HTML?
Chapter 4 Summary
• An HTML element = Opening Tag + Content + Closing Tag.
• Block elements start on a new line, take full width: <div>, <p>, <h1>.
• Inline elements flow within text, take only needed space: <span>, <a>, <strong>.
• Void elements have no content or closing tag: <br>, <hr>, <img>, <input>.
• Nesting = putting elements inside elements. Close in reverse order.
• <div> groups block content. <span> groups inline content.
• Attributes add information to elements: src, href, class, id, alt, style.
CHAPTER 05
5.1 Headings — h1 to h6
HTML has 6 levels of headings, from <h1> (most important, largest) to <h6> (least important, smallest).
Think of them like a newspaper: the main story has a big headline, smaller stories have smaller
headlines.
📌 IMPORTANT NOTE
Use only ONE <h1> per page — it is the main title.
<h1> is the most important for SEO (Search Engine Optimisation).
Do not skip heading levels: go h1 → h2 → h3, NOT h1 → h4.
Do NOT use headings just to make text big — use CSS for size instead.
5.2 Paragraphs
The <p> tag defines a paragraph of text. Browsers automatically add space above and below
paragraphs.
💡 PRO TIP
Use <p> tags for paragraphs, NOT the <br> tag.
Tag Purpose
<br> Line break inside a paragraph. Self-closing.
<hr> Horizontal rule — a visual divider line across the page. Self-
closing.
<!-- Use <strong> for important content (better for accessibility and SEO) -->
<!-- <pre> = Preformatted text (preserves spaces and line breaks) -->
<pre>
function hello() {
return 'Hello World';
}
</pre>
⚠️ WARNING
Never use <b> or <i> when you mean <strong> or <em>.
Screen readers (for blind users) treat <strong> and <em> as IMPORTANT.
<b> and <i> are purely visual — they carry no meaning for accessibility.
🚀 BEST PRACTICE
Use <strong> for important content, not just to make text bold.
Use <em> for emphasis, not just to italicize.
Use <mark> to highlight key terms in articles.
Use <del> and <ins> for showing document revisions.
Use <code> for technical terms and inline code.
❓ QUICK QUIZ
Q1. What is the difference between <b> and <strong>?
Q2. What is the difference between <i> and <em>?
Q3. How many heading levels does HTML have? Which is most important?
Q4. What does <pre> do differently from a normal paragraph?
Q5. What is the difference between <sup> and <sub>? Give examples.
Q6. What does <mark> do?
Q7. What is <blockquote> used for?
🎯 INTERVIEW QUESTIONS
What is the semantic difference between <b>/<i> and <strong>/<em>?
Why should you use only one <h1> tag per page?
What is the purpose of the <pre> tag?
How would you display a keyboard shortcut in HTML?
What is the difference between <q> and <blockquote>?
Chapter 5 Summary
• Headings h1-h6 define the page hierarchy. Use only ONE h1 per page.
• <p> for paragraphs. <br> for line breaks. <hr> for dividers.
• <strong> = bold + important. <em> = italic + emphasised.
• <mark> = highlight. <small> = fine print. <del> = strikethrough. <ins> = inserted.
• <sup> = superscript (exponents). <sub> = subscript (chemical formulas).
• <blockquote> for long quotes. <q> for short inline quotes.
• <code> = inline code. <pre> = preformatted multi-line code. <kbd> = keyboard input.
CHAPTER 06
Lists
Ordered, Unordered, Description — and how to nest them
Tag Type
<ul> Unordered List — bullet points (no specific order)
<ol> Ordered List — numbered list (order matters)
<dl> Description List — term + definition pairs (like a glossary)
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>React</li>
</ul>
By default, unordered lists show bullet points (•). You can change the bullet style with CSS:
<!-- You can change the bullet type in CSS: -->
<style>
ul { list-style-type: disc; } /* default bullet */
ul { list-style-type: circle; } /* hollow circle */
ul { list-style-type: square; } /* filled square */
ul { list-style-type: none; } /* no bullet - great for nav menus */
</style>
<ol>
<li>Boil water</li>
<li>Add pasta</li>
<li>Cook for 10 minutes</li>
<li>Drain and serve</li>
</ol>
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language — used to create web pages</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets — used to style web pages</dd>
<dt>JavaScript</dt>
<dd>A programming language that makes web pages interactive</dd>
</dl>
Tag Role
<dl> Description List container
<dt> Description Term (the word or title)
<dd> Description Definition (the explanation, indented by default)
<ul>
<li>Frontend Development
<ul>
<li>HTML</li>
<li>CSS
<ul>
<li>Flexbox</li>
<li>Grid</li>
</ul>
</li>
<li>JavaScript</li>
</ul>
</li>
<li>Backend Development
<ul>
<li>[Link]</li>
<li>Python</li>
</ul>
</li>
</ul>
📌 IMPORTANT NOTE
When nesting lists, put the inner <ul> or <ol> INSIDE the <li> element.
The inner list is part of the list item, not a sibling of it.
Browsers automatically indent nested lists.
<nav>
<ul>
<li><a href="[Link]">Home</a></li>
<li><a href="[Link]">About</a></li>
<li>
<a href="[Link]">Courses</a>
<ul>
<li><a href="[Link]">HTML</a></li>
<li><a href="[Link]">CSS</a></li>
<li><a href="[Link]">JavaScript</a></li>
</ul>
</li>
<li><a href="[Link]">Contact</a></li>
</ul>
</nav>
💡 PRO TIP
Navigation menus are always built with <nav> + <ul> + <li> + <a>.
CSS then transforms this list into a horizontal menu bar.
This pattern is used on literally every website you visit!
❓ QUICK QUIZ
Q1. What is the difference between <ul> and <ol>?
Q2. What does <dl>, <dt>, and <dd> stand for?
Q3. How do you start an ordered list from number 5?
Q4. How do you create a list without bullet points?
Q5. What does a nested list mean? Give an example.
Q6. How are navigation menus built using HTML lists?
Chapter 6 Summary
• <ul> = unordered list with bullets. <ol> = ordered list with numbers.
• <li> = list item — used inside both <ul> and <ol>.
• <dl> <dt> <dd> = description list for term-definition pairs (glossaries).
• Nested lists: put a <ul> or <ol> inside an <li> element.
• Navigation menus are built with <nav><ul><li><a> structure.
• Use list-style-type in CSS to change or remove bullet/number styles.
CHAPTER 07
Type Description
Absolute URL Full complete address: [Link]
Relative URL Partial path relative to current file: [Link] or
../images/[Link]
<!-- ABSOLUTE URL: full path (used for external websites) -->
<a href="[Link]
<a href="[Link] Video</a>
<!-- RELATIVE URL: path relative to current file (used for your own pages) -->
<a href="[Link]">About</a>
<a href="courses/[Link]">HTML Course</a>
<a href="../[Link]">Back to Home</a> <!-- ../ means go up one folder -->
💡 PRO TIP
Use relative URLs for links within your own website.
Use absolute URLs for links to other websites.
../ means go up one folder level.
⚠️ WARNING
ALWAYS add rel="noopener noreferrer" when using target="_blank".
Without it, the new page can access and manipulate your page via JavaScript.
This is a security vulnerability called 'reverse tabnabbing'.
Attribute Purpose
href The destination URL or anchor id
target Where to open: _blank=new tab, _self=same tab (default),
_parent, _top
rel Relationship to linked page. noopener noreferrer for security.
download Triggers file download. Can specify filename.
title Tooltip text shown when hovering over link.
type MIME type of the linked resource: type="application/pdf"
/* When hovered */
a:hover { color: orange; }
/* Already visited */
a:visited { color: purple; }
🚀 BEST PRACTICE
Always use descriptive link text. NOT: click here. YES: Download the PDF brochure.
Add rel="noopener noreferrer" to all external links that open in new tabs.
Use meaningful anchor IDs: id="contact-form" not id="f1".
Test all links regularly to avoid dead (404) links on your website.
❓ QUICK QUIZ
Q1. What is the difference between an absolute URL and a relative URL?
Q2. How do you open a link in a new tab?
Q3. Why should you use rel="noopener noreferrer" with target="_blank"?
Q4. How do you create a link that opens the email app?
Q5. How do you make a link jump to a section on the same page?
Q6. What does the download attribute do on an anchor tag?
Chapter 7 Summary
• <a href="..."> creates a hyperlink. href is the destination.
• Absolute URLs: full path for external links. Relative URLs: partial path for internal links.
• target="_blank" opens link in new tab. Always add rel="noopener noreferrer".
• mailto: links open email clients. tel: links open phone dialers.
• download attribute triggers file download instead of navigation.
• Page anchors use id attributes and #id in href to jump to page sections.
CHAPTER 08
Images
Add visuals that enhance your web pages
Attribute Purpose
src Source — the path or URL of the image. REQUIRED.
alt Alternative text — describes the image for screen readers and
SEO. REQUIRED.
width Width in pixels or percentage. Only set width OR height (not
both) to preserve aspect ratio.
height Height in pixels.
title Tooltip text shown when user hovers over the image.
loading loading="lazy" defers loading until image is near viewport —
improves performance.
decoding decoding="async" improves page rendering performance.
• Accessibility: Screen readers (used by visually impaired users) read the alt text.
• SEO: Search engines cannot see images — they read alt text to understand the image.
• Fallback: If the image fails to load, the alt text is displayed instead.
🚀 BEST PRACTICE
Write alt text as if you are describing the image to someone on a phone call.
For decorative images (backgrounds, dividers), use alt="" (empty) to skip them.
Never start alt text with 'Image of...' or 'Photo of...' — screen readers already say 'image'.
Keep alt text under 125 characters.
<!-- srcset: provide multiple sizes, browser picks the best one -->
<img
src="[Link]"
srcset="
[Link] 400w,
[Link] 800w,
[Link] 1600w"
sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1600px"
alt="Responsive beach photo"
>
<picture>
<!-- Load WebP for browsers that support it -->
<source type="image/webp" srcset="[Link]">
<figure>
<img src="[Link]" alt="Eiffel Tower at night">
<figcaption>
The Eiffel Tower illuminated at night in Paris, France. Photo taken in 2023.
</figcaption>
</figure>
<!-- figure can contain diagrams, charts, code blocks too -->
<figure>
<pre><code>[Link]('Hello');</code></pre>
<figcaption>Figure 1: Hello World in JavaScript</figcaption>
</figure>
❓ QUICK QUIZ
Q1. What are the two REQUIRED attributes of an <img> tag?
Q2. Why is the alt attribute important?
Q3. What is the difference between JPG and PNG?
Q4. When would you use an SVG image?
Q5. What does loading="lazy" do?
Q6. What is the purpose of the <figure> element?
Chapter 8 Summary
• <img src="..." alt="..."> embeds images. Both src and alt are required.
• alt text describes images for screen readers, SEO, and when images fail to load.
• Common formats: JPG (photos), PNG (transparency), SVG (vectors), WebP (modern).
• Responsive images: use srcset for multiple sizes, <picture> for art direction.
• <figure> + <figcaption> = semantic image with caption.
• Always add loading="lazy" and specify width/height for performance.
CHAPTER 09
HTML Tables
Present data in rows and columns like a spreadsheet
⚠️ WARNING
NEVER use tables for page layout! This was common in the 1990s but is now bad practice.
Use CSS Flexbox and Grid for page layouts.
Use tables ONLY for actual tabular data: schedules, prices, statistics, etc.
<table border="1">
<caption>Student Marks Report - June 2025</caption>
<thead>
<tr>
<th>Name</th>
<th>HTML</th>
<th>CSS</th>
<th>JavaScript</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>Rakesh</td>
<td>95</td>
<td>88</td>
<td>92</td>
<td>275</td>
</tr>
<tr>
<td>Priya</td>
<td>90</td>
<td>93</td>
<td>87</td>
<td>270</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">Class Average</td>
<td>272.5</td>
</tr>
</tfoot>
</table>
📌 IMPORTANT NOTE
colspan="2" merges 2 columns into 1.
rowspan="3" merges 3 rows into 1.
When you use rowspan or colspan, remove the cells that the span covers from other rows.
th, td {
border: 1px solid #ddd;
padding: 12px 16px;
text-align: left;
}
th {
background-color: #1A1A2E;
color: white;
}
/* Hover effect */
tr:hover {
background-color: #FFF3E0;
}
</style>
❓ QUICK QUIZ
Q1. What is the difference between <th> and <td>?
Q2. What do <thead>, <tbody>, and <tfoot> do?
Q3. How do you merge two columns together?
Q4. How do you merge two rows together?
Q5. What CSS property removes double borders between table cells?
Q6. Should you use tables for page layout? Why or why not?
Chapter 9 Summary
• Tables are for tabular data ONLY — not for layout.
• Structure: <table> → <thead>/<tbody>/<tfoot> → <tr> → <th>/<td>.
• colspan merges cells horizontally. rowspan merges cells vertically.
• Use border-collapse: collapse; in CSS to remove double borders.
• <caption> adds a title above the table.
• Use nth-child(even) for zebra-striped rows.
CHAPTER 10
HTML Forms
Collect user input — the foundation of all web interaction
The container for all form elements. The action attribute specifies
<form> where to send the data. The method attribute specifies how (GET or
POST).
<!-- method="GET" = Data sent in URL (visible). For search forms. -->
<!-- method="POST" = Data sent in body (hidden). For sensitive data. -->
Attribute Purpose
placeholder Grey hint text inside the field: placeholder="Enter your name"
required Makes the field mandatory — form won't submit if empty
name Identifies the field when data is sent to server. REQUIRED for
form submission.
id Used to link <label> to the input via for attribute
value Default pre-filled value of the input
disabled Greys out and disables the input — cannot be edited
readonly Value shown but cannot be changed
min / max Minimum/maximum value for number, date, range inputs
step Step increment for number and range inputs
maxlength Maximum number of characters allowed
minlength Minimum number of characters required
pattern Regular expression for custom validation: pattern="[0-9]{10}"
autocomplete Browser auto-complete: autocomplete="on" or "off"
multiple Allow multiple values (for email and file inputs)
accept Filter file types for file upload: accept="image/*"
<label>
<input type="checkbox" name="terms" value="agreed" required>
I agree to the Terms and Conditions *
</label>
</form>
<!-- Clicking the label text now focuses the input field -->
💡 PRO TIP
HTML5 validation happens automatically — no JavaScript needed for basic validation.
Use the pattern attribute with a regex for custom formats like PIN codes and phone numbers.
Add novalidate to the <form> tag to disable HTML5 validation (if you're using custom JS
validation).
❓ QUICK QUIZ
Q1. What is the difference between method="GET" and method="POST"?
Q2. What does the required attribute do?
Q3. How do you connect a <label> to an <input>?
Q4. What is <fieldset> used for?
Q5. What does the placeholder attribute do?
Q6. What input type would you use for a date picker?
Q7. How do you restrict a text field to exactly 10 digits?
🎯 INTERVIEW QUESTIONS
Explain the difference between GET and POST in forms.
What is the purpose of the name attribute on form inputs?
How does HTML5 form validation work?
What is the difference between disabled and readonly attributes?
How would you create a group of radio buttons where only one can be selected?
Chapter 10 Summary
• <form action method> is the container. action=destination, method=GET or POST.
• All inputs need a name attribute for their data to be sent to the server.
• Use <label for="id"> to link labels to inputs — important for accessibility.
• 22+ input types: text, password, email, number, date, range, color, file, checkbox, radio...
• Validation attributes: required, minlength, maxlength, min, max, pattern.
• <fieldset> and <legend> group related form fields visually.
CHAPTER 11
Semantic HTML
Write code that means something — for humans and machines
The semantic code is easier to read, better for SEO, and more accessible for screen readers.
Tag Meaning
<header> Page or section header. Usually contains logo, title, and nav.
<nav> Navigation links — main menus, breadcrumbs, table of contents.
<main> Main content area. Only ONE per page. Screen readers jump
here.
<section> A thematic grouping of content. Like a chapter in a book.
<article> Self-contained content: blog post, news article, product card.
<aside> Sidebar content related to the main content. Ads, tips, related
posts.
<footer> Page or section footer. Copyright, links, contact info.
<figure> Groups an image with its caption.
<header>
<h1>10000 Coders</h1>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/courses">Courses</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
</header>
<main>
<section id="hero">
<h2>Learn Coding from Zero to Hero</h2>
<p>Join over 10,000 students who have launched their tech careers.</p>
</section>
<section id="courses">
<h2>Our Popular Courses</h2>
<article class="course-card">
<h3>HTML & CSS Masterclass</h3>
<p>Build beautiful websites from scratch.</p>
<time datetime="2025-07-01">Starts July 1, 2025</time>
</article>
<article class="course-card">
<h3>JavaScript Full Course</h3>
<p>From basics to advanced JavaScript and ES6+.</p>
<aside>
<h3>Quick Links</h3>
<ul>
<li><a href="/placement">Placement Support</a></li>
<li><a href="/testimonials">Student Reviews</a></li>
</ul>
</aside>
</main>
<footer>
<address>
10000 Coders | Hyderabad, Telangana, India<br>
<a href="[Link]
</address>
<p><small>© 2025 10000 Coders. All rights reserved.</small></p>
</footer>
</body>
</html>
<details>
<summary>What is HTML?</summary>
<p>HTML stands for HyperText Markup Language. It is the standard language
used to create the structure of web pages.</p>
</details>
<details>
<summary>Do I need to know programming to learn HTML?</summary>
<p>No! HTML is a markup language, not a programming language.
It is perfect for complete beginners.</p>
</details>
For Accessibility
• Screen readers (software used by visually impaired people) navigate by semantic tags.
• Pressing Tab should cycle through landmarks: header → main → footer.
• <nav> lets screen readers jump directly to navigation.
🚀 BEST PRACTICE
Use <header>, <main>, <footer> on every page for proper structure.
Use <article> for self-contained content that could stand alone.
Use <section> for thematic groupings WITHIN a page.
Use <aside> for content related to but separate from the main content.
Use <nav> ONLY for major navigation blocks, not every group of links.
❓ QUICK QUIZ
Q1. What is Semantic HTML and why is it important?
Q2. What is the difference between <section> and <article>?
Q3. What is <aside> used for?
Q4. How many <main> tags can a page have?
Q5. What do <details> and <summary> create without JavaScript?
Q6. Why is Semantic HTML better for SEO?
Chapter 11 Summary
• Semantic HTML uses tags that carry meaning — <header>, <main>, <footer>, <nav>.
• <section> = thematic group. <article> = self-contained content. <aside> = sidebar.
• <details> + <summary> = native collapsible content — no JavaScript needed.
• <time datetime> = machine-readable date/time.
• Semantic HTML improves SEO, accessibility, and code readability.
• Always prefer semantic tags over generic <div> and <span>.
CHAPTER 12
Multimedia
Audio, Video, iFrames, and Embedding Content
Attribute Effect
controls Shows play/pause, volume, and progress controls
autoplay Starts playing automatically (browsers may block this)
loop Repeats the audio when it ends
muted Starts muted (useful with autoplay)
preload preload="auto" loads file immediately. "metadata" loads only info.
💡 PRO TIP
Always provide multiple source formats: mp4 and webm for maximum compatibility.
Use muted with autoplay — browsers block autoplay with sound.
Add playsinline for iOS Safari to play videos inline instead of fullscreen.
<iframe
src="[Link]
width="600"
height="450"
style="border:0;"
allowfullscreen
loading="lazy"
referrerpolicy="no-referrer-when-downgrade">
</iframe>
⚠️ WARNING
Be careful with iframes — only embed content from trusted sources.
Some websites block embedding with the X-Frame-Options header.
Iframes can slow down your page — use loading="lazy" where possible.
❓ QUICK QUIZ
Q1. What HTML5 tags replaced Flash for audio and video?
Q2. Why should you provide multiple <source> formats for audio/video?
Q3. What does the poster attribute do on a <video>?
Q4. How do you embed a YouTube video in HTML?
Q5. What is an <iframe>?
Q6. Why should you use muted with autoplay?
Chapter 12 Summary
• <audio controls> and <video controls> play media natively in HTML5.
• Provide multiple <source> formats: mp3+ogg for audio, mp4+webm for video.
• Video attributes: controls, autoplay, muted, loop, poster, playsinline.
• Embed YouTube with <iframe src="[Link]/embed/ID">.
• Google Maps embeds also use <iframe>. Get the code from Maps → Share → Embed.
CHAPTER 13
HTML5 APIs
Canvas, SVG, Storage, Geolocation, and More
<script>
const canvas = [Link]('myCanvas');
const ctx = [Link]('2d');
// Draw text
[Link] = 'white';
[Link] = '20px Arial';
[Link]('Hello Canvas!', 60, 105);
</script>
<script>
// localStorage: data persists even after browser is closed
[Link]('username', 'Rakesh');
[Link]('theme', 'dark');
Storage Characteristics
localStorage Persists after browser close. Up to ~5MB. Same origin only.
<script>
function getLocation() {
if ([Link]) {
[Link](showPosition, showError);
} else {
[Link]('location-output').textContent =
'Geolocation is not supported by this browser.';
}
}
function showPosition(position) {
const lat = [Link];
const lon = [Link];
[Link]('location-output').textContent =
'Latitude: ' + lat + ' | Longitude: ' + lon;
}
function showError(error) {
[Link]('location-output').textContent =
'Error: ' + [Link];
}
</script>
📌 IMPORTANT NOTE
The browser always asks the user for PERMISSION before sharing location.
Geolocation only works on HTTPS websites (not plain HTTP) for security.
Users can always deny location access — always handle the error case.
</div>
<script>
function allowDrop(e) { [Link](); }
function drag(e) { [Link]('text', [Link]); }
function drop(e) {
[Link]();
const id = [Link]('text');
[Link]([Link](id));
}
</script>
❓ QUICK QUIZ
Q1. What is the <canvas> element used for?
Q2. What is the difference between Canvas and SVG?
Q3. What is the difference between localStorage and sessionStorage?
Q4. Does the Geolocation API require user permission?
Q5. Can the Geolocation API work on HTTP (non-secure) sites?
Q6. What attribute makes an element draggable?
Chapter 13 Summary
• <canvas> is a pixel-based drawing area. Draw with JavaScript using getContext('2d').
• SVG = Scalable Vector Graphics. Inline SVG is in the DOM and CSS/JS accessible.
• localStorage: persists across sessions. sessionStorage: clears when tab closes.
• Geolocation API: [Link]() — requires permission + HTTPS.
• Drag and Drop: draggable="true" + ondragstart, ondrop, ondragover events.
CHAPTER 14
Accessibility (a11y)
Build websites that everyone can use
Short form for 'accessibility' — 'a', then 11 letters, then 'y'. Widely
a11y
used in the web development community.
<!-- aria-label: gives accessible name to element with no visible text -->
<button aria-label="Close menu">✕</button>
<a href="/" aria-label="Go to Home Page">🏠</a>
⚠️ WARNING
NEVER use outline: none; on focused elements without providing an alternative!
This makes the site unusable for keyboard and screen reader users.
Focus indicators are a legal accessibility requirement in many countries.
</figcaption>
</figure>
🚀 BEST PRACTICE
Test your website with a screen reader — NVDA (Windows) and VoiceOver (Mac/iOS) are free.
Use browser extensions like axe DevTools or Lighthouse to audit accessibility.
Design with colour blind users in mind — don't rely on colour alone to convey information.
WCAG 2.1 is the international accessibility standard. Aim for AA compliance at minimum.
❓ QUICK QUIZ
Q1. What does a11y stand for?
Q2. What are ARIA attributes used for?
Q3. Why should you never remove focus outlines?
Q4. What does aria-label do?
Q5. What is a 'skip navigation' link?
Q6. When should alt="" (empty alt) be used?
Chapter 14 Summary
• Accessibility (a11y) ensures everyone can use your website, including disabled users.
• ARIA attributes (aria-label, role, aria-hidden) add context for screen readers.
• All interactive elements must be keyboard accessible (tabindex, focus styles).
© 2025 HTML Complete Master Guide | Page 65 of 94
HTML Complete Master Guide | Beginner to Advanced | HTML5
CHAPTER 15
SEO in HTML
Optimise your pages to rank on Google
<!-- Meta description - Shown in search results under the title -->
<!-- 150-160 characters. Include keyword naturally. -->
<meta name="description"
content="Learn HTML from scratch with our complete beginner guide.
Covers structure, forms, semantic HTML, and real projects. Free course.">
<!-- Canonical URL - Tells search engines the preferred URL -->
<link rel="canonical" href="[Link]
<head>
<!-- Open Graph tags -->
<meta property="og:title" content="Learn HTML - Complete Guide 2025">
<meta property="og:description" content="Master HTML from zero to advanced.">
<meta property="og:image" content="[Link]
<meta property="og:url" content="[Link]
<meta property="og:type" content="website">
<meta property="og:site_name" content="10000 Coders">
💡 PRO TIP
Use Facebook's Sharing Debugger to see how your OG tags look when shared.
OG images should be 1200x630 pixels for best results.
Every page should have unique title and description tags.
❓ QUICK QUIZ
Q1. What is SEO?
Q2. What is the most important HTML element for SEO?
Q3. What do Open Graph meta tags do?
Q4. What is a canonical tag?
Q5. Why is alt text important for SEO?
Q6. How long should a meta description be?
Chapter 15 Summary
• SEO = making your page appear higher in Google search results.
• Most important SEO tag: <title> — unique, 50-60 characters, includes keyword.
• <meta name="description"> is shown in search results — write it to attract clicks.
• Open Graph tags control social media previews when sharing links.
• Use semantic HTML, one h1 per page, proper hierarchy, and descriptive alt text.
• Google uses Lighthouse (in Chrome DevTools) to score your page for SEO.
CHAPTER 16
Performance Optimisation
Make your pages load faster
<!-- With lazy loading: image loads only when user scrolls near it -->
<img src="[Link]" alt="Product" loading="lazy" width="400" height="300">
<!-- Important: Set width and height to prevent layout shifts -->
<!-- This helps the browser reserve space before image loads -->
<img src="[Link]" alt="Banner" loading="lazy" width="1200" height="400">
<!-- async: loads in background, runs WHEN READY (order not guaranteed) -->
<script src="[Link]" async></script>
</head>
Method Behaviour
Normal <script> Blocks page rendering. Avoid in <head>.
defer Loads while parsing HTML. Runs after HTML is done. Keeps
order.
async Loads while parsing HTML. Runs as soon as ready. Order not
guaranteed.
Chapter 16 Summary
• Page speed is critical: 53% of users leave if it takes more than 3 seconds.
• loading="lazy" on images and iframes defers loading until needed.
• Always set width and height on images to prevent Cumulative Layout Shift (CLS).
• Use defer for app scripts, async for independent scripts (analytics).
• Compress and convert images to WebP. Use srcset for responsive images.
• Audit with Lighthouse in Chrome DevTools (press F12 → Lighthouse tab).
CHAPTER 17
Responsive HTML
Build pages that work on any screen size
⚠️ WARNING
If you forget the viewport meta tag, your page will look zoomed out and tiny on mobile.
This is the single most common mistake beginners make when building their first pages.
<!-- HTML srcset: serve different image sizes per device -->
<img
src="[Link]"
srcset="
[Link] 320w,
[Link] 640w,
[Link] 800w,
[Link] 1280w"
sizes="
(max-width: 480px) 320px,
(max-width: 768px) 640px,
800px"
alt="Responsive landscape photo"
>
🚀 BEST PRACTICE
Design MOBILE FIRST: start with mobile styles, then add media queries for larger screens.
Google's mobile-first indexing means mobile experience directly impacts your search ranking.
Use the Chrome DevTools Device Toolbar to test your page on different phone sizes.
Chapter 17 Summary
• Responsive design = pages that adapt to any screen size automatically.
• The viewport meta tag is REQUIRED: <meta name="viewport" content="width=device-width,
initial-scale=1.0">.
• Responsive images: max-width:100%; height:auto; or use srcset attribute.
• Media queries: @media (min-width: 768px) change layout at different sizes.
• Mobile-first: write mobile styles first, then enhance for larger screens.
• Test on real devices and Chrome DevTools Device Toolbar.
CHAPTER 18
Real-World Projects
Build complete websites from scratch
Pages Required
• [Link] — Home page with hero section, skills, and featured projects
• [Link] — Your story, education, experience
• [Link] — Grid of your projects with links
• [Link] — Contact form and social links
<header>
<nav>
<div class="logo">RG</div>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section id="home" class="hero">
<section id="skills">
<h2>My Skills</h2>
<ul class="skills-grid">
<li>HTML5</li>
<li>CSS3</li>
<li>JavaScript</li>
<li>React</li>
</ul>
</section>
<section id="projects">
<h2>Featured Projects</h2>
<article class="project-card">
<img src="[Link]" alt="E-commerce website screenshot">
<h3>E-commerce Website</h3>
<p>A full product listing page with cart functionality.</p>
<a href="[Link] target="_blank"
rel="noopener">GitHub</a>
<a href="[Link] target="_blank" rel="noopener">Live Demo</a>
</article>
</section>
<section id="contact">
<h2>Get In Touch</h2>
<form action="/contact" method="POST">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
</main>
<footer>
<p>© 2025 Rakesh Gora. All rights reserved.</p>
</footer>
</body>
</html>
Key Sections
• Hero section with full-width food image
• Menu section with categories: Starters, Mains, Desserts
• About the restaurant with story and chef photo
• Reservation form
• Location with embedded Google Map
• Contact details with phone link and email link
<details open>
<summary>🍤 Starters</summary>
<table>
<thead>
<tr><th>Item</th><th>Description</th><th>Price</th></tr>
</thead>
<tbody>
<tr>
<td>Samosa Chaat</td>
<td>Crispy samosas with tangy chutneys</td>
<td>₹99</td>
</tr>
<tr>
<td>Paneer Tikka</td>
<td>Grilled cottage cheese with spices</td>
<td>₹199</td>
</tr>
</tbody>
</table>
</details>
<details>
<summary>🍛 Main Course</summary>
<!-- ... -->
</details>
</section>
Project Pages/Sections
College Website Home, Departments, Faculty, Admissions, Contact
Blog Website Index page with articles, individual blog post page
E-commerce Product Product images, description, price, add to cart
Page
Hotel Website Rooms, Amenities, Gallery, Booking form, Location
Hospital Website Services, Doctors, Appointment form, Emergency contact
Job Board Job listings, job details, application form
News Website Hero news, category sections, featured articles
Resume/CV Page Skills, Experience, Education, Projects, Contact
🚀 BEST PRACTICE
Always build real projects — they are 10x more valuable than exercises.
Host your projects on GitHub Pages (free) to share with employers.
Add your projects to a portfolio website.
Document your projects: add a README with screenshots and description.
CHAPTER 19
Interview Preparation
100+ Real HTML Interview Questions
🎯 INTERVIEW QUESTIONS
What is HTML? What does it stand for?
What is the difference between HTML and HTML5?
What is the purpose of <!DOCTYPE html>?
What is the difference between <head> and <body>?
What is a tag? What is an element? What is an attribute?
What is a void element? Give 5 examples.
What is the difference between <b> and <strong>?
What is the difference between <i> and <em>?
How do you create a comment in HTML?
What is the purpose of the alt attribute in images?
What is the difference between <ol> and <ul>?
How do you open a link in a new tab?
What is the href attribute? What is its purpose?
What is the viewport meta tag? Why is it important?
What is the difference between id and class attributes?
🎯 INTERVIEW QUESTIONS
What is the difference between block-level and inline elements? Give examples.
Explain the HTML5 semantic elements. Why are they important?
What is the difference between <section> and <article>?
What is the difference between GET and POST methods in forms?
What is HTML5 form validation? Give 4 validation attributes.
What is the DOM? How does the browser build it?
What is the difference between localStorage and sessionStorage?
How does the <picture> element work? When would you use it?
What is the purpose of the <figure> and <figcaption> elements?
What is the difference between colspan and rowspan in tables?
What is the srcset attribute on images? Why is it important?
Explain the <details> and <summary> elements.
What is the purpose of the name attribute in form inputs?
What is ARIA? Name 3 ARIA attributes.
What is the difference between absolute and relative URLs?
🎯 INTERVIEW QUESTIONS
What is the difference between Canvas and SVG?
Explain the Geolocation API in HTML5.
What are Web Workers and why are they useful?
What is the Drag and Drop API in HTML5?
Explain the difference between preload, prefetch, and dns-prefetch.
What is a critical rendering path?
What is the difference between defer and async on script tags?
What is Cumulative Layout Shift (CLS) and how do you prevent it?
What is structured data in HTML? What format is it in?
What are Open Graph meta tags? List 5 of them.
What is a canonical URL? When would you use it?
Explain WCAG accessibility standards.
What is tabindex? When would you use -1 vs 0?
How do you implement keyboard navigation in HTML?
What is the Content Security Policy (CSP) meta tag?
What HTML would you use for a product price that shows old and new price?
❓ QUICK QUIZ
Q1. Which element is used to group list items in an ordered list? a)<li> b)<ul> c)<ol> d)<dl>
Q2. Which attribute is used to make a form field required? a)validate b)required c)mandatory
d)must
Q3. What does <br> do? a)Bold text b)Line break c)Border d)Button reset
Q4. Which semantic tag is for the site footer? a)<bottom> b)<foot> c)<footer> d)<end>
Q5. What is the correct DOCTYPE declaration? a)<!doctype> b)<!DOCTYPE HTML5> c)<!
DOCTYPE html> d)<DOCTYPE>
Q6. Which attribute specifies alternate text for an image? a)src b)alt c)title d)name
Q7. Which input type creates a date picker? a)type=calendar b)type=date c)type=datetime
d)type=picker
Q8. What does the target="_blank" do? a)Opens in same tab b)Opens in new tab c)Downloads
file d)Closes tab
Chapter 19 Summary
Review all these questions before your interview. Practice writing the code examples from memory.
The best preparation is building real projects — the confidence you gain from completing real websites
is invaluable in interviews.
• Beginner questions focus on: tags, elements, attributes, basic structure.
• Intermediate questions focus on: semantic HTML, forms, tables, APIs.
• Advanced questions focus on: performance, accessibility, SEO, Canvas, SVG.
• Always explain your reasoning — interviewers want to know HOW you think.
CHAPTER 20
Tag Purpose
<!DOCTYPE html> HTML5 document type declaration
<html> Root element of HTML page
<head> Contains meta information
<body> Contains visible page content
<title> Browser tab title and SEO title
<meta charset> Character encoding
<meta viewport> Responsive design setup
<link> Links CSS files, favicon, preloads
<script> Links JavaScript files
<style> Inline CSS in HTML
Tag Purpose
<h1>–<h6> Headings (h1=largest, h6=smallest)
<p> Paragraph
<br> Line break (self-closing)
<hr> Horizontal rule/divider
<strong> Bold + important (semantic)
<em> Italic + emphasised (semantic)
<b> Bold (visual only)
<i> Italic (visual only)
<mark> Highlighted text
<small> Smaller text (fine print)
<del> Strikethrough (deleted text)
<ins> Underline (inserted text)
Tag/Attribute Purpose
<a href=""> Hyperlink
<a target="_blank"> Open in new tab
<a href="[Link] Email link
<a href="[Link] Phone link
<a href="#id"> Jump to page section
<a download> Download file
20.4 Images
Tag/Attribute Purpose
<img src alt> Embed image (src and alt required)
loading="lazy" Lazy load image
srcset="" Multiple image sizes for responsiveness
<picture> Art direction responsive images
<figure> Group image with caption
<figcaption> Caption for <figure>
20.5 Lists
Tag Purpose
<ul><li> Unordered (bullet) list
<ol><li> Ordered (numbered) list
<ol start="5"> Start list from 5
20.6 Tables
Tag Purpose
<table> Table container
<thead>/<tbody>/ Semantic table sections
<tfoot>
<tr> Table row
<th> Table header cell (bold, centered)
<td> Table data cell
colspan="n" Merge n columns
rowspan="n" Merge n rows
<caption> Table title
20.7 Forms
Tag/Attribute Purpose
<form action method> Form container
<input type="text"> Text input
<input type="email"> Email input
<input Password input
type="password">
<input Checkbox
type="checkbox">
<input type="radio"> Radio button
<input type="date"> Date picker
<input type="file"> File upload
<input type="range"> Slider
<input type="color"> Colour picker
<input type="submit"> Submit button
<textarea> Multi-line text input
<select><option> Dropdown list
<label for> Label for input
<fieldset><legend> Group form inputs
required Make field mandatory
Tag Meaning
<header> Page or section header
<nav> Navigation links
<main> Main content (one per page)
<section> Thematic content group
<article> Self-contained content
<aside> Sidebar content
<footer> Page or section footer
<figure> Image with caption
<figcaption> Caption for figure
<details> Collapsible content
<summary> Title of <details>
<time> Date or time
<address> Contact information
<mark> Highlighted text
20.9 Multimedia
Tag Purpose
<audio controls> HTML5 audio player
<video controls> HTML5 video player
<source src type> Media source (inside audio/video)
<iframe src> Embedded webpage or video
<canvas> Drawing area (with JavaScript)
<svg> Inline vector graphics
Attribute Purpose
id Unique identifier for element
CHAPTER 25
Capstone Project
Build a complete professional multi-page website
Pages to Build
40. [Link] — Home page with hero, courses, testimonials, and CTA
41. [Link] — All courses listed with details and pricing
42. [Link] — About the institute, team, and mission
43. [Link] — Placement statistics and company logos
44. [Link] — Blog/articles listing page
45. [Link] — Contact form, location map, phone, and email
Features to Implement
• Responsive navigation bar with logo and mobile hamburger menu
• Hero section with headline, subheading, and two CTA buttons
• Courses section using <article> cards in a grid layout
• Testimonials with student photos, names, and quotes (<blockquote>)
• Statistics section (students trained, placement rate, companies)
• FAQ using <details> and <summary> — no JavaScript required
• Complete registration/enquiry form with full validation
• Embedded Google Maps on contact page
• Footer with sitemap links, social media links, and copyright
• All images lazy-loaded with proper alt text
• Complete SEO meta tags on every page
• Open Graph tags for social sharing
Technology Requirements
Technology Requirement
HTML5 Semantic structure, all elements from this book
Accessibility ARIA labels, keyboard nav, proper alt text
<main id="main-content">
<article class="course-card">
<img src="images/[Link]"
alt="HTML CSS course preview" loading="lazy" width="400"
height="250">
<h3>HTML & CSS Masterclass</h3>
<p>Build beautiful responsive websites from scratch.</p>
<ul>
<li>8 Weeks</li>
<li>Live Classes</li>
<li>Certificate</li>
</ul>
<p class="price">₹4,999 <del>₹8,999</del></p>
<a href="[Link]#html-css" class="btn-card">Learn More</a>
</article>
<article class="course-card">
<img src="images/[Link]"
alt="JavaScript course preview" loading="lazy" width="400"
height="250">
<h3>JavaScript Full Course</h3>
<p>From basics to advanced — ES6, DOM, APIs and more.</p>
<ul>
<li>12 Weeks</li>
<li>Live Classes</li>
<li>Projects</li>
</ul>
<p class="price">₹7,999 <del>₹14,999</del></p>
<a href="[Link]#javascript" class="btn-card">Learn More</a>
</article>
</div>
<div class="center">
<a href="[Link]" class="btn-primary">View All Courses</a>
</div>
</div>
</section>
<details>
<summary>Do I need prior coding knowledge?</summary>
<p>Absolutely not! Our courses start from the very basics.
All you need is a computer and the willingness to learn.</p>
</details>
<details>
<summary>Do you provide placement assistance?</summary>
<p>Yes! We have a dedicated placement team. 92% of our students
get placed within 3 months of completing their course.</p>
</details>
</div>
</section>
</main>
<footer>
<div class="container">
<address>
<strong>10000 Coders</strong><br>
Hyderabad, Telangana, India<br>
<a href="[Link] 98765 43210</a><br>
<a href="[Link]
</address>
<nav aria-label="Footer navigation">
<ul>
<li><a href="[Link]">Privacy Policy</a></li>
<li><a href="[Link]">Terms of Use</a></li>
</ul>
</nav>
<p><small>© 2025 10000 Coders. All rights reserved.</small></p>
</div>
</footer>
🚀 BEST PRACTICE
Build ALL 6 pages of this project before calling it complete.
Push your completed project to GitHub and host it on GitHub Pages.
Share the link on LinkedIn with a post about what you learned.
This project alone can land you a junior frontend developer job!
Congratulations!
You have completed the HTML Complete Master Guide. You now know:
• The complete HTML document structure from DOCTYPE to closing html tag
• Every HTML5 element, attribute, and semantic tag
• How to build complete responsive, accessible, SEO-optimised web pages
• Forms, tables, multimedia, Canvas, SVG, and Web Storage APIs
• How to prepare for HTML interview questions at any level
Your HTML journey does not end here. The next steps are:
46. CSS (Cascading Style Sheets) — to style and design your pages
47. JavaScript — to make pages interactive
48. A CSS framework like Tailwind CSS
49. A JavaScript framework like React
50. Git and GitHub — for version control