Loading...
Loading...
Create a simple HTML page and learn how tags structure content
HTML (HyperText Markup Language) is the language of the web. Every website you've ever visited ā from Google to YouTube to this page ā is built with HTML. It's not a programming language like Python; it's a markup language that structures content using tags.
Think of HTML like the skeleton of a building. It defines where the walls go, where the rooms are, and what's a door vs. a window. CSS (later module) adds the paint and decorations.
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<p>Hello, World!</p>
</body>
</html>| Tag | What it does |
|---|---|
| `` | Declares this is an HTML5 document (required) |
| `` | The root element ā wraps everything |
| `` | Contains metadata, title, and links to CSS |
| ` | Text shown in the browser tab |
| `` | Everything the user sees goes here |
| ` ` | A paragraph of text |
When you open an HTML file in a browser:
Most HTML tags come in pairs:
` ā **opening tag** (turns the feature on)
HTML is required for any web content:
| ā Wrong | Why | ā Right |
|---|---|---|
| ` Hello ` (case mismatch) | Tag names should be lowercase | ` Hello ` |
| ` Hello` (no closing tag) | Everything after becomes part of this paragraph | ` Hello ` |
| `...` missing doctype | Browser may render in "quirks mode" | Start with `` |
Create a complete HTML page with:
` paragraph containing your name
<!DOCTYPE html>
<html>
<head>
<title>Infex's Page</title>
</head>
<body>
<p>Infex</p>
</body>
</html>