- Understand the structure of HTML documents
- Learn how to use basic HTML elements
- Create and structure your first HTML page
BMC201 - Web Technology
2026-01-28
Lecture 3
HTML Basics & Structure
Week 1 | Unit I: Web Page Designing
BMC201 - Web Technology
Mr. Prashant Kumar Nag, Assistant Professor
Learning Objectives
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
Quick Practice Exercise
Create an HTML page with:
<em> or <strong> somewhere<ul>)Resources & References
Questions?
Next: Lecture 4 - HTML Grouping: Div & Span