HTML Tags
Recommended With
Table of Contents
1 Intro
Below is a quick reference guide for the most popular HTML tags used to structure web pages, format text, and add interactive features. While this isn't a massive encyclopedia of every tag in existence, it covers the core elements you will use in almost every project!
2 Document setup
These setup tags work behind the scenes to help browsers load styles, titles, and scripts for your page.
The root container that wraps everything on your web page.
<html lang="en">...</html>
Holds your site title, search engine info, and links to your style or script files.
<head><title>My Site</title></head>
Sets the text displayed inside your browser tab.
Contains all the visible content like your divs, text, images, and buttons.
<body><p>Hi</p></body>
Sets hidden details for your page, like mobile screen fitting, character encoding, or search descriptions.
<meta charset="UTF-8">
Attaches outside files to your page, such as your CSS stylesheet or site icons.
<link rel="stylesheet" href="style.css">
Lets you write custom CSS rules directly inside your page file.
<style>body { color: red; }</style>
3 Headings & Paragraphs
Use these elements to add written content and break your page into clean sections.
Section titles. Use <h1> for main titles and <h2> through <h6> for subheadings.
h1 Title Preview
h2 Title Preview
h3 Title Preview
h4 Title Preview
h5 Title Preview
h6 Title Preview
Standard text blocks for your paragraphs.
Hello! This is a typical paragraph block.
Forces a line break without starting a whole new paragraph block.
Line 2
Draws a horizontal dividing line to separate content.
More text, seperated with a line from the other.
Indents text to highlight longer quotes cleanly.
"This is a quote preview."
4 Lists
Organize information into lists!
Creates a bulleted list for items where order does not matter.
- First bullet point
- Second bullet point
Creates a numbered list for ordered steps or rankings.
- First step
- Second step
Defines an individual row entry inside bulleted or numbered lists.
A description list structure, perfect for term definitions.
- HTML
- The standard markup language for web pages.
5 Text formatting
Apply these tags inside paragraphs to change how specific words look or add links.
Makes text bold.
Italicizes text.
Underlines text.
Draws a line through text to show deleted or outdated information.
Applies a bright highlight background behind specific text.
Makes text smaller for fine print, disclaimers, or side notes.
Positions text below or above the line for chemical formulas or math expressions.
Styles inline text with a monospaced font to indicate code snippets.
x = 10
A neutral inline container used to target specific text for custom CSS styling.
6 Media
Embed graphics, audio clips, and video players.
Displays an image on your page. The alt tag is optional and describes your image, in case it fails to load.
Wraps an image together with a text caption underneath it.
Displays a built-in player for audio files.
Displays a video player on your page.
7 Forms and input fields
Add input controls so your visitors can type messages, select options, and submit data.
The main wrapper that holds your inputs together and sends their data to a server.
Creates text tied to an input field, so clicking the text focuses the input box.
A single-line field for entering plain text like names, emails, or search terms.
A square box for toggling options on or off, allowing multiple selections.
A round selection button where picking one option unselects the others in the group.
A larger multi-line text box for longer texts or messages.
Creates a drop-down menu for visitors to pick one choice from a list.
A clickable button used to send form entries or run scripts.
8 Interactive
Native HTML elements that support dynamic browser interactions without needing heavy scripts.
Builds a simple clickable dropdown box to show or hide extra text.
Click to view details
Surprise! Here is the hidden content.
<dialog id="box">
Your modal text here!
<button onclick="box.close()">Close</button>
</dialog>
Creates a native popup window with open and close buttons.
Displays a loading bar to show how far along a task or download is.
9 HTML5 containers
Use layout tags to group the main areas of your page. They replace generic div tags so browsers and search engines easily understand your site structure, though you will still use classes and IDs alongside them for styling!
The top area of your page or article, usually holding your logo, site title, or main banner.
A box meant specifically for your main menu and navigation links.
Holds the primary content of the page, excluding stuff like menus or footers.
Groups related content together, almost like a chapter in a book.
A self-contained piece of content that makes sense on its own, like a blog post or news story.
Content placed off to the side, like a sidebar.
The bottom section of your page for copyright notes, contact info, or extra links.