🌱BeginnerHTML Foundations
What is HTML?
Understand what HTML is, how browsers render it, and why it is the foundation of every web page.
Overview
HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. Every web page you visit whether it's a news article, a shop, or a social network is built on HTML.
HTML is not a programming language. It is a markup language, meaning you use it to annotate content with meaning. You wrap text and media in tags that tell the browser what each piece of content is: a heading, a paragraph, a link, an image, a list, and so on.
The browser reads the HTML file, builds a tree-like structure called the DOM (Document Object Model), and renders a visual page from it. HTML describes the structure and meaning of content; CSS controls the visual appearance; JavaScript adds interactivity. Together, these three technologies form the foundation of every website.
Key Points
- •HTML = HyperText Markup Language the standard language for web page structure
- •HTML uses tags (like <p>, <h1>, <a>) to give content meaning and structure
- •The browser parses HTML into a DOM tree and renders it as a visual page
- •HTML is not a programming language it has no logic, loops, or variables
- •HTML works alongside CSS (styling) and JavaScript (behavior) to build complete web pages
- •An HTML file is a plain text file saved with a .html extension
Examples
The simplest possible HTML page
<!DOCTYPE html>
<html lang="en">
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first HTML page.</p>
</body>
</html>Save this as index.html and open it in any browser to see a rendered page.
HTML tags give content meaning
<!-- A heading -->
<h1>Welcome to My Site</h1>
<!-- A paragraph of text -->
<p>HTML tells the browser what each piece of content is.</p>
<!-- A clickable link -->
<a href="https://example.com">Visit Example</a>Each tag describes the role of the content inside it.
Browsers render HTML you write markup, they show a page
<!-- In the HTML file -->
<strong>This text is bold.</strong>
<em>This text is italic.</em>
<!-- The browser shows the visual result automatically -->Common Mistakes
- Thinking HTML is a programming language it has no logic or conditions
- Confusing HTML (structure) with CSS (style) HTML alone has no colors or fonts
- Forgetting to save the file as .html before opening it in the browser
Note
Create an index.html file, paste the first example into it, and open it in your browser. You have written your first HTML page.
Exercises
Write HTML to solve each exercise. Use Preview to see it render in a live iframe, then mark as done.
Loading editor…
Completed: 0 / 5 exercises
Knowledge Check
Question 1 of 4