What is HTML?
HTML (HyperText Markup Language) is the standard language for creating web pages. It provides the structure of a website and tells the browser what to display – such as text, images, videos, and links.
Think of HTML as the skeleton of a web page, while CSS is like its skin and clothes that make it look attractive.
Why Learn HTML?
It’s the foundation of web development.
Every website you see (like YouTube, Facebook, Amazon) is built with HTML.
It’s easy to learn and perfect for beginners.
HTML is required for learning advanced topics like CSS, JavaScript, or WordPress.
Basic Structure of an HTML Page
An HTML page is written using tags. The basic structure looks like this:
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first HTML page.</p>
</body>
</html>
Explanation of the Code:
<!DOCTYPE html>– Declares the document as HTML5.<html>– The root tag of the web page.<head>– Contains page information (like title, meta data).<title>– The title of the page (appears in the browser tab).<body>– Contains the content of the page.<h1>– A heading tag (largest size).<p>– A paragraph of text.
.
Key HTML Terms You Should Know
Tags:
<h1>,<p>,<div>etc.Elements: A tag with its content, e.g.,
<p>Hello</p>.Attributes: Extra information inside a tag, e.g.,
<img src="image.jpg" alt="image">.
Try It Yourself
Copy the below code and save it as index.html on your computer. Then open it in a browser:
<!DOCTYPE html>
<html>
<head>
<title>HTML Test</title>
</head>
<body>
<h1>Welcome to My HTML Page</h1>
<p>This is the first step towards becoming a web developer.</p>
</body>
</html>
Mini Task for You
Change the
<h1>text to your own name.Add another paragraph
<p>with your favorite quote.
Next Module
In Module 2, we will explore HTML Tags and Elements in detail.