HTML Guide Phrase Inline Elements
User Manual:
Open the PDF directly: View PDF
.
Page Count: 4

HTML Guide: Inline/Phrase Elements
Element
Code
Note
Basic Inline Elements
Strong
(logical style)
<strong></strong>
<strong>It is <strong>wise to
invest</strong> regularly.</strong>
Indicates strong importance for its
contents.
The number of ancestor <strong>
elements sets the relative level of
importance for a phrase. Each strong
element increases the importance of its
nested content.
Usually displays text as bolded
Bold
(physical style)
<b></b>
According to the HTML 5, the <b> tag
should be used as a last resort when no
other tag is more appropriate.
HTML 5 further defines usage of the <b>
element as for a span of text to which
attention is being drawn for utilitarian
purposes without conveying any extra
importance. Important text should be
markup with the <strong> tag.
Emphasis
(logical style)
<em></em>
<em>Cats are <em>cute</em> pets!</em>
Represents stress emphasis of its
contents.
The number of ancestor <em> elements
sets the level of stress for a phrase.
Usually displays text as italics.
Italics
(physical style)
<i></i>
Defines a part of text in an alternate voice
or mood. Can be used to indicate a
technical term, a phrase from another
language, a thought, or a ship name, etc.
The content of the <i> tag is usually
displayed in italic.
According to the HTML 5, the <i> tag
should be used as a last resort when no
other tag is more appropriate.
Emphasized text should be denoted with
the <em> tag.

Cite
<cite></cite>
Identifies a title of a work (e.g. a book, a
paper, an essay, a poem, a score, a song, a
script, a film, a TV show, a game, a
sculpture, a painting, a theatre production,
a play, an opera, a musical, an exhibition,
a legal case report, etc). This can be a
work that is being quoted or referenced in
detail (i.e. a citation), or it can just be a
work that is mentioned in passing.
It can, additionally, be used to identify the
author of a work, oral statement, post, or
tweet, etc.
Lastly, it can identify an online source,
such as a website, that is the source of an
excerpt or quote.
Do not use cite for quotes.
(See examples that follows this guide)
Quote
<q></q>
Use for inline quoted content.
Browsers often insert quotation marks
around the quotation.
(See examples that follows this guide)
Lang attribute
<q lang="language_code">
Specifies the language of the element's
content.
Cite attribute
<q cite="URL"></q>
Specifies the source URL of the quote.
Do not confuse with the Cite Element.
Small
(physical style)
<small></small>
Defines side comments such as
small print.
Subscript
(physical style)
<sub></sub>
Defines subscript text.
Subscript text appears half a character
below the baseline.
Subscript text can be used for chemical
formulas, like H2O.
Superscript
(physical style)
<sup></sup>
Defines superscript text.
Superscript text appears half a character
above the baseline.
Superscript text can be used for footnotes,
like WWW[1]
Definition
<dfn></dfn>
Indicates the defining instance of the
enclosed term
Title attribute
<dfn title="term goes here"></dfn>
The Title attribute should be present and
its value is the term being defined.
(See examples that follows this guide)

Abbreviation
<abbr></abbr>
Indicates an abbreviated form or an
acronym.
Marking up these constructs provides
useful information to user agents
(browsers) and tools such as spell
checkers, speech synthesizers, translation
systems and search-engine indexers.
(See examples that follows this guide)
Keyboard
<kbd></kbd>
Indicates text to be entered by the user
Span
<span></span>
By itself does not render a visual style.
Use to apply inline CSS to intra-
paragraph content. Needs the style, class,
or id attributes to assign CSS to the
content enclosed in this element.
Inline Elements (to denote edits)
Insert Element
<ins></ins>
Defines a text that has been inserted into
a document.
Browsers will normally underline
inserted text.
Delete Element
<del></del>
Defines a text that has been deleted from
a document.
Browsers will normally strike a line
through deleted text
S Element
<s></s>
The <s> element is deprecated in HTML
4.01, and used to define strikethrough
text.
The <s> element is redefined in HTML5,
and is now used to define text that is no
longer correct, accurate or relevant.
U Element
<u></u>
In HTML 4.01, the <u> element is
deprecated.
In previous versions of HTML the <u>
element was used to define underlined
text.
The <u> element is redefined in HTML5,
and it represents text that should be
stylistically different from normal text,
such as misspelled words or proper nouns
in Chinese.
Inline Elements (to denote code or programming constructs)
Code
<code></code>
Designates a fragment of computer code
Sample
<samp></samp>
Designates sample output from programs,
scripts, etc.

Variable
<var></var>
Indicates an instance of a variable or
program argument
Inline Element Examples
Using the Quote Element
<p>The boss said <q>Things that are impossible just take longer</q>.</p>
<p>Harry Truman said, <q lang="en-us">The buck stops here.</q></p>
<p>The W3C page <cite>About W3C</cite> says the W3C's mission is
<q cite="http://www.w3.org/Consortium/">To lead the World Wide Web to its full
potential by developing protocols and guidelines that ensure long-term growth
for the Web</q>.</p>
Using the Cite Element
<p>The book <cite>To Kill a Mockingbird</cite> was made into a movie
starring Gregory Peck.</p>
<p><cite>Universal Declaration of Human Rights</cite>, United Nations,
December 1948. Adopted by General Assembly resolution 217 A (III).</p>
<p>In the words of <cite>Charles Bukowski</cite> - <q>An intellectual
says a simple thing in a hard way. An artist says a hard thing in a
simple way.</q></p>
<p><q>We are an international community where Member organizations, a
full-time staff, and the public work together to develop Web
standards<q>, <cite>World Wide Web Consortium (www.w3c.org)</cite>.
Using the Definition Element
<p>Kyle knows how to make applets, <dfn title="Applets">Java programs
that can be embedded on a Web page</dfn>.</p>
Using the ABBR Element
<p>
<abbr title="Miscellaneous">Misc.</abbr>
</p>
Acronym example
<p>
<abbr title="Radio Detection and Ranging">RADAR</abbr>
</p>