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 phrase - acronym
an abbreviation comprising the initial letters of a given phrase - address
identifies an administrator or owner of a document - b
sets enclosed text to bold type - basefont
sets a basic font size for normal browser text - bdo
overrides the current text direction - big
increases the font size of text - blink
blinks text on-off - center
centers all the enclosed content - cite
identifies a reference to a written work, play, book, or magazine - code
identifies text as computer or machine-readable code - comment
inserts a comment into markup - del
identifies deleted content - dfn
identifies the defining instance of a term - em
signifies emphasized content - font
the (out-of-favor) font styling element - i
sets the enclosed text to italic type - ins
identifies inserted content - kbd
identifies a typed entry on a keyboard - marquee
scrolling text area - nobr
tells browser not to break/wrap contained text - noscript
provides alternative content for use when scripts aren’t supported or are switched off - plaintext
tells browser to treat all following text as plain text - pre
defines preformatted text in which whitespace and line breaks are preserved - q
defines an inline quotation - rb
specifies ruby base text - rbc
defines the ruby base container for complex ruby markup - rp
specifies ruby parentheses - rt
defines ruby text annotation - rtc
defines a ruby text container for complex ruby markup - ruby
provides a mechanism for annotating foreign characters - s
renders text with a horizontal strike (line) through the middle - samp
defines a sample of the characters to be output - small
sets a reduced font size for the enclosed text - span
creates a generic inline container - strike
renders text with a horizontal strike (line) through the middle - strong
signifies strongly emphasized content - sub
specifies subscript text - sup
specifies superscript text - tt
specified text to be formatted in monospace, or fixed-width font - u
underlines enclosed text - var
defines a variable part of a phrase or example - wbr
suggests where in a word a break should occur - xmp
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.