What is HTML
What is HTML
HTML stands for HyperText Markup Language. It is the standard language for creating web pages. HTML describes the structure of a page using elements - tags that tell the browser what content is and how it should be organized.
How HTML Works
You write HTML in a text file with a .html extension. The browser reads this file and renders the content visually. HTML is not a programming language - it does not have logic, loops, or variables. It is a markup language that defines structure and meaning.
Your First HTML Page
Every HTML page follows the same basic skeleton:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first web page.</p>
</body>
</html>
The <!DOCTYPE html> declaration tells the browser to use HTML5. The <html> element is the root. The <head> contains metadata. The <body> contains visible content.
Tags and Elements
An element consists of an opening tag, content, and a closing tag. Some elements are self-closing like <img> and <br>. Attributes provide additional information inside the opening tag.
<a href="https://example.com" target="_blank">Click here</a>
<img src="photo.jpg" alt="A sunset" width="400">
How to Practice
Open any text editor, write HTML, save as index.html, and open in your browser. That is all you need. No compiler, no build tools, no server required.
Key Points
- HTML is a markup language that defines the structure of web pages.
- Every page needs
<!DOCTYPE html>,<html>,<head>, and<body>. - Tags define elements; attributes provide additional information.
- HTML does not require compilation - the browser renders it directly.
- Practice by writing files and opening them in a browser.