Lesson 2.1: Introduction to HTML & Basic Document Structure
What is HTML?
-
HTML (HyperText Markup Language) is the standard language used to create the structure of web pages.
-
It defines what elements appear on a webpage (such as text, images, links, tables, forms, etc.).
-
HTML is not a programming language; it is a markup language that uses tags to describe content.
Key Features of HTML
-
Provides the skeleton of a website.
-
Uses tags enclosed within
< >. -
Works together with:
-
CSS for styling (colors, fonts, layouts).
-
JavaScript for interactivity (animations, logic, events).
-
-
Standard HTML files use the
.htmlextension.
Basic HTML Document Structure
Every webpage has a common structure:
Explanation of Structure:
-
<!DOCTYPE html>→ Declares the document as HTML5. -
<html>→ Root element of the entire page. -
<head>→ Contains metadata (title, styles, scripts, SEO info). -
<title>→ Title displayed on the browser tab. -
<body>→ Contains all visible content (headings, text, images, links, etc.).
Why Learn HTML?
-
It is the foundation of all websites.
-
Without HTML, a webpage cannot exist.
-
It is the first step before learning CSS and JavaScript.
