Progress:0%
HTML Basics 4 min readLesson 1 of 3

HTML Introduction

What is HTML, how does the web browser render HTML tags, and building your first webpage.

### What is HTML? HTML stands for HyperText Markup Language. It is the standard markup language for creating Web pages.

  • HyperText: Text that links to other pages or media.
  • Markup Language: A collection of tags that annotate document structure.
  • Web Browsers: Browsers like Chrome, Firefox, and Safari read HTML documents and render them visually.

A Simple HTML Document

An HTML document consists of nested tags enclosed in angle brackets ().

html
<!DOCTYPE html>
<html>
<head>
  <title>My First HTML Page</title>
</head>
<body>
  <h1>Welcome to TheCodeBrains</h1>
  <p>This is a paragraph of text inside an HTML document.</p>
</body>
</html>

Key Tags Explained 1. `<!DOCTYPE html>` — Declares the document type to be HTML5. 2. `<html>` — The root element of an HTML page. 3. `<head>` — Contains meta information about the HTML page (title, styles, scripts). 4. `<title>` — Specifies a title for the browser tab. 5. `<body>` — Defines the document's body, which contains all visible content (headings, paragraphs, images, links).

Interactive Sandbox

HTML5 Hello World Example

Live W3-Editor

Edit code below and see instant live output in the preview box

Source Code InputHTML / CSS / JS
Live Browser Result Live Result

Test Yourself With Exercises

Verify your understanding before moving to the next topic

Chapter Quiz

What does HTML stand for?

First Lesson of Course
Next: HTML Elements & Tags