HTML (HyperText Markup Language) forms the backbone of every website. It structures content using tags and attributes, enabling browsers to render text, images, multimedia, and links in a clear and organized manner. This guide will help beginners and intermediate learners understand HTML deeply and professionally.
A basic HTML document follows a logical structure consisting of the root element, metadata, and the visible content:
<!DOCTYPE html> – Declares the document type and version.<html> – Root element containing all content.<head> – Contains metadata, title, links to stylesheets, and scripts.<body> – Contains the visible content for users.<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Webpage</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>This paragraph demonstrates the basic HTML structure.</p>
</body>
</html>
Tip: Save this code as index.html and open it in your browser to see the result.
| Tag | Purpose |
|---|---|
<h1> – <h6> |
Headings from largest to smallest, useful for structure and SEO. |
<p> |
Defines a paragraph of text. |
<a> |
Defines a hyperlink with the href attribute. |
<img> |
Embeds an image with src and alt attributes. |
<header>, <main>, <article>, <footer>.Practice HTML in an online editor like CodePen or on your local machine.
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!