This page offers a quick reference by examples of all the elements specified by the XHTML 1.1 W3C standard.
This version of XHTML groups the elements by module, and this is how they are presented here,
with a very brief description and a section of examples of use.
There are already other quick reference pages, like the one on xhtml.com, or this one or this other one with examples. But this page wants to be a single-page brief reference; here it is not explained which attributes an element supports, but that can be seen reading the source code of the examples provided for each element. This page could be used as a summary about XHTML or as a precious tool to design complete (wrt. XHTML elements) CSS stylesheets for your XHTML pages, giving a quick glance at the results.
Modules
The XHTML 1.1 document type is made up of the XHTML modules shown
below. The elements, attributes, and minimal content models associated with
these modules are defined in the XHTML
Modularization document [XHTMLMOD]).
The elements are listed here for information purposes, but the definitions in
[XHTMLMOD]
should be considered definitive.
In this document, the module names in the list below link into the
definitions of
the modules within the current version of [XHTMLMOD].
This module also defines the content set List with the minimal content model
(dl | ol | ul)+ and adds this set to the Flow content set of the
Text Module.
When this module is used, the hr element is added to the
Block content set of the Text Module. In addition,
the b, big, i, small, sub, sup, and tt elements are
added to the Inline content set of the Text Module.
When this module is used, it adds the Form content set to the
Block content set and it adds the Formctrl content set to
the Inline content set as these are defined in the Text
Module.
XHTML also uses the Ruby Annotation module as defined in [RUBY]:
Examples
Structure Module
We don't show explicit examples for elements in the
Structure module because they are Singleton elements, already used for the
structure of this very page. Although you can style the body
and html
elements.
Text module
The Text module elements can be used inside a text to enrich it semantically.
They are all style-able.
abbr
We all know what XHTML
means, don't we?
acronym
On the contrary someone doesn't know RADAR is
an acronym.
address
Antonio is from
Naples, Italy
a strange, still beautiful, city.
blockquote
I usually say:
Better looser than poser!
Not very widespread these days.
br
Break the line here this is new line
cite
Even if you are not Buddhist follow the Dalai Lama
suggestions.
code
Format source code using the <code></code>
element.
dfn
I wonder how much my silly definition of happiness:
Happiness is the limit of our mood function when “how I currently feel” approaches
to “how I want to feel”
is flawed...
div
DIVs are used to
divide
block elements.
em
This em is not really a typographical measure.
h1
This could be for
Book
titles.
h2
This could be for
Chapter
titles.
h3
This could be for
Section
titles.
h4
This could be for
Sub-Section
titles.
h5
This could be for
Sub-Sub-Section
titles.
h6
This could be for
Sub-Sub-Sub-Section
titles.
kbd
Do not press Ctrl-Q, really!
p
Is this before a paragraph?
A paragraph (from the Greek paragraphos, “to write beside” or “written
beside”) is a self-contained unit of a discourse in writing dealing with a
particular point or idea.