HTML tags are the fundamental building blocks of web pages, used to define structure, content, and formatting. They are enclosed in angle brackets (< >) and typically come in pairs: an opening tag (e.g., <p>) and a closing tag (e.g., </p>), though some tags are self-closing (e.g., <img />).
Core HTML Tags by Function
Content and Text Formatting Tags
<p>: Defines a paragraph of text.<h1>to<h6>: Defines headings, with<h1>being the most important and<h6>the least.<strong>: Represents strong importance (usually rendered in bold).<em>: Indicates emphasis (typically rendered in italics).<a>: Creates a hyperlink using thehrefattribute to specify the destination.<img>: Embeds an image usingsrc(source) andalt(alternative text) attributes.<br>: Inserts a single line break.<hr>: Represents a thematic break (e.g., a horizontal line).<code>: Displays text as computer code.<pre>: Shows preformatted text, preserving whitespace and line breaks.
Structural and Layout Tags
<div>: A block-level container for grouping content (often used with CSS for styling).<span>: An inline container for styling specific parts of text.<ul>: Defines an unordered (bulleted) list.<ol>: Defines an ordered (numbered) list.<li>: Represents a list item within<ul>or<ol>.<table>: Creates a data table with<tr>(table row),<td>(table cell), and<th>(table header) elements.<section>: Defines a section of a document (e.g., a chapter or thematic grouping).<article>: Represents a self-contained composition (e.g., a blog post or news article).<nav>: Defines navigation links.<aside>: Contains content aside from the main content (e.g., sidebars).<header>: Defines a header for a document or section.<footer>: Defines a footer for a document or section.
Semantic and Interactive Tags
<mark>: Highlights text that is marked or highlighted for reference.<del>: Indicates deleted text.<ins>: Marks inserted text.<details>and<summary>: Create a disclosure widget where content is hidden until opened.<button>: Defines a clickable button.<form>: Creates an interactive form for user input.<input>: Defines a form control (e.g., text field, checkbox).<label>: Associates a label with a form control.<meta>: Provides metadata about the document (e.g., charset, description, viewport).
For a complete, up-to-date reference with examples, consult the MDN Web Docs HTML Elements Reference.