HTML Overview
HTML is the foundation of every website. It defines what content appears on a web page and how that content is structured.
HTML does not control design or logic.
Its job is simple: structure the content so browsers can understand and display it correctly.
What HTML Is
HTML stands for HyperText Markup Language.
- HyperText → links between pages
- Markup → tags used to mark content
- Language → rules that browsers understand
HTML uses tags to describe content like text, images, links, forms, and media.
What HTML Does
HTML is used to:
- Create page structure (headings, paragraphs, sections)
- Display images, videos, and audio
- Create links between pages
- Build forms for user input
- Define layout and semantic meaning
HTML works together with:
- CSS → styling (colors, layout, design)
- JavaScript → behavior (interaction, logic)
Basic HTML Page Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Simple HTML overview example">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Overview</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>This is a simple HTML page.</p>
</body>
</html>
What Each Part Means
<!DOCTYPE html>
Declares that this document uses HTML5<html lang="en">
Root element of the pagelanghelps browsers and screen readers<head>
Contains page information (not visible)<meta charset="UTF-8">
Supports all modern characters and symbols<meta name="viewport">
Makes the page responsive on all devices<title>
Page title shown in the browser tab<body>
Contains visible page content
How HTML Works in a Browser
- Browser reads the HTML file
- It interprets tags from top to bottom
- Content is displayed based on tag meaning
- CSS styles it, JavaScript adds behavior (if present)
Important Notes
- HTML is not case-sensitive, but lowercase is best practice
- Tags usually come in pairs (
<p></p>) - Some tags are self-closing (
<img>,<meta>) - HTML files use the
.htmlextension
Why Learning HTML Is Important
- Required for web development
- Easy to learn, powerful in use
- Works on all browsers and devices
- Base for learning CSS, JavaScript, and frameworks