# HTML & Markup Reference
Comprehensive reference for HTML5, markup languages, and document structure.
## Core Concepts
### HTML (HyperText Markup Language)
The standard markup language for creating web pages and web applications.
**Related Terms**: HTML5, XHTML, Markup, Semantic HTML
### Elements
Building blocks of HTML documents. Each element has opening/closing tags (except void elements).
**Common Elements**:
- `
` - Generic container
- `
` - Inline container
- `` - Self-contained content
- `` - Thematic grouping
- `` - Navigation links
- `` - Introductory content
- `` - Footer content
- `` - Main content
- `` - Complementary content
### Attributes
Properties that provide additional information about HTML elements.
**Common Attributes**:
- `id` - Unique identifier
- `class` - CSS class name(s)
- `src` - Source URL for images/scripts
- `href` - Hyperlink reference
- `alt` - Alternative text
- `title` - Advisory title
- `data-*` - Custom data attributes
- `aria-*` - Accessibility attributes
### Void Elements
Elements that cannot have content and don't have closing tags.
**Examples**: ` `, ` `, ` `, ` `, ` `, ` `
## Semantic HTML
### What is Semantic HTML?
HTML that clearly describes its meaning to both the browser and the developer.
**Benefits**:
- Improved accessibility
- Better SEO
- Easier maintenance
- Built-in meaning and structure
### Semantic Elements
| Element | Purpose | When to Use |
|---------|---------|-------------|
| `` | Self-contained composition | Blog posts, news articles |
| `` | Thematic grouping of content | Chapters, tabbed content |
| `` | Navigation links | Main menu, breadcrumbs |
| `` | Tangential content | Sidebars, related links |
| `` | Introductory content | Page/section headers |
| `` | Footer content | Copyright, contact info |
| `` | Main content | Primary page content |
| `` | Self-contained content | Images with captions |
| `` | Caption for figure | Image descriptions |
| `` | Date/time | Publishing dates |
| `` | Highlighted text | Search results |
| `` | Expandable details | Accordions, FAQs |
| `` | Summary for details | Accordion headers |
### Example: Semantic Document Structure
```html
Semantic Page Example
Article Title
March 4, 2026
Article content goes here...
```
## Document Structure
### Doctype
Declares the document type and HTML version.
```html
```
### Head Section
Contains metadata about the document.
**Common Elements**:
- ` ` - Metadata (charset, viewport, description)
- `` - Page title (shown in browser tab)
- ` ` - External resources (stylesheets, icons)
- `