Important HTML tags

Tagged Storm Trooper

This page is designed as a quick reference for some of the common tags covered in Learn Enough HTML to Be Dangerous. In the process of making it, we'll learn how to make HTML tables via table and related tags.

The tables below don't include all HTML tags, but they do list many of the most important ones.

Block Elements

Tag Name Purpose
h1h6 headings include a heading (levels 1–6)
p paragraph include a paragraph of text
table table include a table
tr table row include a row of data
th table header make a table header
td table data include a table data cell
header header include a container for introductory content
div division group elements to format them with CSS
ol ordered list make an ordered list
ul unordered list make an unordered list
li list item defines a list item within an ordered list or unordered list
blockquote HTML Block Quotation Element defines a long quotation

Inline Elements

Tag Name Purpose Example Result
em emphasized make emphasized text <em>technical sophistication</em> technical sophistication
strong strong make strong text <strong>at least a billion people</strong> at least a billion people
a anchor make hyperlink <a href="https://learnenough.com/">Learn Enough</a> Learn Enough
img image include an image <img src="https://bit.ly/1MZAFuQ" alt="Michael Hartl"> Michael Hartl
code computer code Designed to display pieces of markup or source code <code>button</code> button
span span group inline elements <span>Some text</span> Some text
br br Defines a line break within a text Some text is<br>broken Some text is
broken

Document tags

Tag Name Purpose
html root element Defines the root element of an HTML document
head head Defines a container for a web page's metadata.
It provides general information (metadata) about the document, including its title and links to its scripts and style sheets.
body body The container for a web page's content
title title Defines the title of the web page, displayed on the browser tab
meta meta Defines metadata attached to a web page.
Represents the metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.