After this lecture, students will be able to:
- explain the structure of HTML documents
- use basic HTML elements correctly
- create and structure a valid first HTML page
BMC201 - Web Technology
2026-01-28
Lecture 3
HTML Introduction, Basic Structure & Tags
Week 1 | Unit I: Web Page Designing
BMC201 - Web Technology
Mr. Prashant Kumar Nag, Assistant Professor
Learning Outcomes
After this lecture, students will be able to:
Prerequisites
Syllabus Mapping
Syllabus mapping:
Prerequisites used:
Agenda
Introduction and Motivation
Think About It - Interactive Questions
Before we dive into details, think about these:
HTML Document as a Tree
flowchart TD Root["html"] Head["head"] Body["body"] Meta["meta charset"] Title["title"] H1["h1 - Heading"] P["p - Paragraph"] A["a - Link"] Root --> Head Root --> Body Head --> Meta Head --> Title Body --> H1 Body --> P P --> A
What is HTML?
HTML = HyperText Markup Language
Basic HTML Document Structure
<!DOCTYPE html> # <1>
<html lang="en"> # <2>
<head>
<meta charset="UTF-8"> # <3>
<title>My First Web Page</title> # <4>
</head>
<body>
<h1>Welcome to Web Technology</h1> # <5>
<p>This is my first HTML page.</p>
</body>
</html>Anatomy of an HTML Element
+-------------------------------------+
� <p class="intro">Hello World</p> �
+-------------------------------------+
+-----------------------------------------------+
� Opening � Attribute� Content � Closing Tag �
� Tag � � � �
� <p � class=" � Hello � </p> �
� > � intro" � World � �
+-----------------------------------------------+
Element = Opening Tag + Attributes + Content + Closing Tag
Self-closing (Void) Elements
Some HTML elements don’t need closing tags:
These don’t have content, just attributes
Common HTML Tags
Structural
<h1> to <h6>: Headings<p>: Paragraph<div>: Container<section>: SectionContent
<a>: Hyperlink<img>: Image<ul>, <ol>, <li>: Lists<table>: Tabular dataHTML Attributes
Attributes provide additional information about elements:
<a href="https://example.com" target="_blank">Link</a>
<img src="logo.png" alt="Company Logo" width="200" height="100">
<div id="header" class="container main-section">Content</div>Common attributes: id, class, src, href, alt, title, style
Heading Hierarchy
? Use <h1> only once per page ? Follow hierarchical order (no jumping from h1 to h3) ? Improves SEO and accessibility
Paragraphs & Text Formatting
Prefer semantic tags (<strong>, <em>) over presentation tags (<b>, <i>)
Proper HTML Nesting
? Correct
? Incorrect
Always close tags in reverse order of opening: Last opened, first closed
Creating Your First HTML Page
.html fileHTML Validation
Always validate your HTML:
Validation prevents browsers from having to guess your intentions
Memory Booster: The Layer Cake Analogy
Think of an HTML document like a layered cake recipe:
<!DOCTYPE html> = The cake tin label (tells everyone what type this is)<html> = The cake stand (holds everything)<head> = Invisible inside layer (metadata, recipe notes - not what you see)<body> = The visible cake (everything your guests actually see and eat)<h1> to <h6> = Cake tiers (hierarchy and importance)<p> = The actual cake layers (content that fills the structure)A cake without tiers is just a blob. A webpage without proper HTML structure is the same!
Resources & References
Structured Debug Checklist for HTML
Investigation order when HTML won’t display:
This approach separates structure vs rendering issues.
Live Demo: HTML Structure Explorer
Interactive demonstration showing HTML document structure, tags, and browser rendering:
?? Open Interactive Demo: HTML Basics & Structure
What you’ll see:
?? Key insight: The same HTML structure looks different with and without CSS!
Summary
After this lecture, you should understand:
Exam Preparation Questions: Short
<!DOCTYPE html>?<head> and <body>?Exam Preparation Questions: Long
Practice Task
Checklist
Can you:
Next Lecture
HTML Introduction, Basic Structure & Tags
Next: Lecture 4 - HTML Grouping: Div & Span