Introduction to HTML
Welcome to the HTML tutorial! HTML (HyperText Markup Language) is the foundation of web development. In this comprehensive tutorial, you'll learn everything you need to know to build modern websites.
What is HTML?
HTML stands for HyperText Markup Language. It's a markup language used to create the structure and content of web pages. HTML uses a system of tags to define different parts of a web page such as headings, paragraphs, links, images, and more.
Why Learn HTML?
- Foundation of all websites
- Easy to learn and understand
- Required for web development
- Works with CSS and JavaScript
- Essential for career in tech
Your First HTML Code
Let's start with a simple HTML document:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first HTML page.</p>
</body>
</html>
Key Points to Remember
- HTML uses tags enclosed in angle brackets:
<tagname>
- Most tags have opening and closing versions:
<p>
and</p>
- Tags can have attributes that provide additional information
- HTML is not case-sensitive, but lowercase is recommended
- Proper indentation makes code more readable
Practice Exercise
Try creating your own HTML file with the basic structure above. Save it as index.html
and open it in your web browser!
Hint!
You can use the symbol ! in VS Code to auto-generate the boilerplate HTML structure. Just type ! and hit Enter.