Text Formatting Elements
This is easily the largest section in this
reference, in terms of the number of elements that it includes. The text
formatting elements listed here range from the extremely useful and
oft-used em (emphasis) and strong
(strong emphasis), through the peculiar and little-known Ruby markup
elements (ruby, rb, rbc, and so on), to the deprecated elements from days long
gone, which include marquee, tt, and big/small.
All the elements included here are Inline and Phrase Elements elements—they can’t be wrapped
around any Block-level Elements (with the
exception of del and ins, whose properties allow them a special
dispensation).
The span element is also listed here.
Strictly speaking, it’s not a text formatting element, as it doesn’t offer
any semantic information on its own. That said, the
span can’t be wrapped around a block element, and is
primarily used to surround text content for the purposes of styling or
scripting. It is for this reason that it has been included in this index
rather than in the Structural Elements.
In this Section
a
defines an anchor (or hyperlink)abbr
defines an abbreviated form of a longer word or phraseacronym
an abbreviation comprising the initial letters of a given phraseaddress
identifies an administrator or owner of a documentb
sets enclosed text to bold typebasefont
sets a basic font size for normal browser textbdo
overrides the current text directionbig
increases the font size of textblink
blinks text on-offcenter
centers all the enclosed contentcite
identifies a reference to a written work, play, book, or magazinecode
identifies text as computer or machine-readable codecomment
inserts a comment into markupdel
identifies deleted contentdfn
identifies the defining instance of a termem
signifies emphasized contentfont
the (out-of-favor) font styling elementi
sets the enclosed text to italic typeins
identifies inserted contentkbd
identifies a typed entry on a keyboardmarquee
scrolling text areanobr
tells browser not to break/wrap contained textnoscript
provides alternative content for use when scripts aren’t supported or are switched offplaintext
tells browser to treat all following text as plain textpre
defines preformatted text in which whitespace and line breaks are preservedq
defines an inline quotationrb
specifies ruby base textrbc
defines the ruby base container for complex ruby markuprp
specifies ruby parenthesesrt
defines ruby text annotationrtc
defines a ruby text container for complex ruby markupruby
provides a mechanism for annotating foreign characterss
renders text with a horizontal strike (line) through the middlesamp
defines a sample of the characters to be outputsmall
sets a reduced font size for the enclosed textspan
creates a generic inline containerstrike
renders text with a horizontal strike (line) through the middlestrong
signifies strongly emphasized contentsub
specifies subscript textsup
specifies superscript texttt
specified text to be formatted in monospace, or fixed-width fontu
underlines enclosed textvar
defines a variable part of a phrase or examplewbr
suggests where in a word a break should occurxmp
example text
User-contributed notes
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.