Table of Contents
What is HTML?
HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page using elements and tags.
HTML Document Structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to HTML!</h1>
<p>This is my first paragraph.</p>
</body>
</html>
Key Components
- <!DOCTYPE html> - Declares the document type
- <html> - Root element of the page
- <head> - Contains metadata about the document
- <body> - Contains the visible content
Practice Exercise
Create your first HTML page with a title, heading, and paragraph. Save it as index.html and open it in your browser.