skip to contentstylized crane logoWhite Crane Education

Phrase Tags

Texts tags in general and phrase tags in particular come in two types: block and inline. Block tags, e.g. the p (paragraph) tags that enclose this paragraph, occupty an entire "block" of text. This means that when the end of the section is reached the browser is required to move to the next free line before displaying the next block of XHTML. You can think of block tags as automatically adding a carriage return after the closing tag. (This is the same affect as typing the Enter key at the end of a paragraph in a word processor.)

Inline tags are used to enclose text within a line. For example this text, document.write, is enclosed in <code> tags. When the closing tag is reached the browser continues to display the following text on the same line.

XHTML's phrase tags are used to mark out text that has a specific function, e.g. an acronym or a quotation. How these tags are displayed is left up to the individual browsers. The following table lists the various phrase tags side by side for comparison but you should keep in mind that the way they look could be different in browsers other than the one that you're using to view the page. In many cases the display is identical to plain text. In these cases the expectation is that developers will create a style sheet definition that specifies how the given tag should appear.

plain text   sample text
abbreviations <abbr> sample text
acronyms <acronym> sample text
citations <cite> sample text
code <code> sample text
definition <dfn> sample text
emphasised <em> sample text
keyboard <kbd> sample text
quotation <q> sample text
blockquote <blockquote>
sample text
sample <samp> sample text
strong <strong> sample text
variables <var> sample text