There are predefined tags in HTML that are used to perform a specific operation that is similar to text format tags. There are several situations in which words can be highlighted, quotes inserted, code displayed in different structures, and so on, to highlight content on the web page.
What are HTML Phrase Tags?
- <abbr> :Indicates an abbreviated form like pvt. inc. etc.
- <em>: Indicates emphasis.
- <strong>: Indicates stronger emphasis.
- <acronym>: Used to highlight the text on a web page.
- <cite>: Used give reference to the other sources.
- <dfn>: Indicates that this is the defining instance of the enclosed term.
- <code>: Designates a fragment of computer code.
- <samp>: Designates sample output from programs, scripts, etc.
- <kbd>: Indicates text to be entered by the user.
- <var>: Indicates an instance of a variable or program argument.
Any text within the <em>…</em> element, is displayed in the emphasized text as shown in the following example:
Output: The following word uses an emphasized typeface.
Any text within the <mark>…</mark> element, is displayed as marked with yellow link as shown in the following example :
Output: The following word has been marked with yellow
Any text within the <strong>…</strong> element, is displayed as important text as shown in the following example:
Output: The following word uses a strong typeface.
Any text within the <abbr>…</abbr> tags, is displayed as abbreviated text as shown in the following example :
Output: This website is all about HTML.
Any text within the <acronym>…</acronym> tags is an acronym as shown in the following example:
Output: This chapter covers marking up text in XHTML
Any text within the <bdo>…</bdo> element overrides the text direction as shown in the following example:
This text will go left to right.
This text will go right to left.
Any text within the <dfn>…</dfn> element signifies introducing a new keyword in the text. This element is used when introducing a keyword in the paragraph as shown in the following example:
Output: The following word is a special term.
If you are quoting a text, you can indicate the source placing it between an opening <cite> tag and closing </cite> tag
As you would expect in a print publication, the content of the <cite> element is rendered in an italicized text by default.
Output: This HTML tutorial is derived from W3 Standard for HTML.
Any text within the <blockquote>…</blockquote> tags is displayed as a quote from another source as shown in the following example:
The following description of XHTML is taken from the W3C Web site:
XHTML 1.0 is the W3C’s first Recommendation for XHTML,following on from earlier work on HTML 4.01, HTML 4.0, HTML 3.2 and HTML 2.0.
Any programming code to appear on a Web page should be placed inside <code>…</code> tags. Usually the content of the <code> element is presented in a monospaced font, just like the code in most programming books.
Output: Regular text.
This is the computer code. Regular text.
The <address>…</address> element is used to contain any address.
Output: 75 3rd Ave, New York, NY 10003, USA