What is HTML?
HTML (HyperText Markup Language) is the standard markup language for creating web pages and web applications. It defines the structure and content of web documents using a system of tags and attributes.
Quick Facts
| Full Name | HyperText Markup Language |
|---|---|
| Created | 1991 by Tim Berners-Lee |
| Specification | Official Specification |
How HTML Works
HTML was created by Tim Berners-Lee in 1991 as part of the World Wide Web project at CERN. It uses a tag-based syntax where elements are enclosed in angle brackets (< >). HTML documents consist of nested elements that define the document structure, including headings, paragraphs, links, images, and forms. HTML5, the current version, introduced semantic elements, native audio/video support, canvas for graphics, and APIs for offline storage and geolocation. HTML works together with CSS for styling and JavaScript for interactivity.
Key Characteristics
- Tag-based markup syntax with opening and closing tags
- Hierarchical document structure (DOM)
- Semantic elements for meaningful content structure
- Supports multimedia (images, audio, video)
- Form elements for user input
- Hyperlinks for navigation between documents
Common Use Cases
- Web page structure and content
- Web application interfaces
- Email templates (HTML email)
- Documentation and technical writing
- Progressive web applications
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
</head>
<body>
<header>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
</nav>
</header>
<main>
<article>
<h1>Main Heading</h1>
<p>This is a paragraph with <strong>bold</strong> text.</p>
<img src="image.jpg" alt="Description">
<ul>
<li>List item 1</li>
<li>List item 2</li>
</ul>
</article>
</main>
<footer>
<p>© 2024 Company Name</p>
</footer>
</body>
</html>