Common HTML tags
listing the most frequently used building blocks of a webpage
Last updated
listing the most frequently used building blocks of a webpage
Last updated
<h1>
... <h6>
Headings have a hierarchy from 1 (the top) to 6 (the bottom)
<h1>...</h1>
will lead while <h2>...</h2>
may or may not follow an <h1>
All full-sized HTML pages should have an <h1>...</h1>
As an aside, documents (think legal documents) rarely have a proper <h5>
and <h6>
because by the point, the document will have become too difficult to follow
try to not have anything further below the <h4>
level for simple HTML pages
Do not use these headings as font sizes, as the numbers serve a structural purpose of making "levels" for the document; we will adjust font sizes later with
<p>
Exactly as advertised: paragraphs of text
By default, paragraphs will have dividing spaces between them like in written text
<ul>
(unordered list) <ol>
(ordered list) <li>
(list item)
An unordered list looks like a list of bullets (like this one!)
An ordered list has numbers (or numerals)
There exist many ways to style the bullets of these lists (more on this later)
A list item appears inside of an unordered or ordered list
<strong>
Usually shows the text in bold type
Conveys the idea of an important keyword in the text of a document
<em>
Usually shows the text in italic type
Conveys the idea of stress on a word or phrase
<del>
or <strikeout>
Usually shows the text slashed horizontally like this
Conveys the idea of removal of a text while still making the text visible
<blockquote>
Usually shows the text indented
Conveys the idea that the text is a reference of some other text
<a href="https://website.com">Website.com</a>
The a
means "anchor" and signifies that it points to another page or site altogether:
The href
means "hypertext reference" (we only need to know it means "address")
<img src="/brand-x-logo.jpg" alt="logo of Brand X" />
Just like the tag for a link, the img tag intuitively has a couple of attributes:
The src
means "source"
We will also have a look at other high-frequency tags that will require pages of their own, namely:
We will see in that href is an attribute
We will also see more of this later in
(along with its variants)
(and <input>)
(and <meta> as well as <title>)