HTML Phrase Tags

HTML Phrase Tags

Sponsored Ads

The phrase tag has been designed for special purposes but they are displayed in a similar way as other formatting tags like <b> <i> <pre> <tt> which you already seen in the previous chapter.

Sponsored Ads

Strong Text

Strong text is used to mark something important and the tag used in Html is <strong>. So anything that appears in between <strong>……</strong> as an important text. It is displayed similar to bold text <b>. But it is recommended to use <strong> instead of <b>.

Example

<p>This is a <strong>Strong</Strong> text</p> 

Output

This is a Strong text

Emphasized Text

The tag for Emphasized Text in Html is <em>. So anything that appears in between <em>….</em>will be displayed as Emphasized Text. It looks similar to italic text (<i>) but <em> means the text is important. So it is recommended to use < em > instead of <i>.

Example

<p>This is a <em> Emphasized Text</em> text</p> 

Output

This is a Emphasized Text text

Marked Text

The tag for marked text is <mark> and anything that appears in between <mark>…..</mark> will be displayed as marked with yellow ink.

Example

<p>The following word has been <mark>marked</mark> with yellow</p> 

Output

The following word has been marked with yellow

Acronym Element

You can mark the text as Acronym using the opening <acronym> and closing </acronym> tag.

Example

<p>In this chapter you will learn how to mark up text in <acronym>XHTML</acronym>.</p>

Output

In this chapter you will learn how to mark up text in XHTML.

Sponsored Ads

Special Terms-
Definition element

Html allows you to say that you are introducing a special term by using the Definition element. For that just add you text in-between the <dfn>…..</dfn> tags. Its usage is similar to adding italic words in between paragraphs. Normally you use the <dfn> element the first time you introduce a key term.

Most browsers render the content inside the <dfn> element in an italic font.

Example

<p>The following word is a <dfn>special</dfn> term.</p>

Output

The following word is a special term.

Computer code

You may need to write programming codes in web pages like this page you are reading. Html has an element for displaying programming codes in web pages. That is the <code>…..<code> element. Usually the content of the <code> element is presented in a monospaced font, just like the code in most programming books.

Example

<p>This is a Regular text.</p>
<p><code>This is code programming code</code></p>

Output

This is a Regular text.

This is code programming code

Keyboard Text

When you are talking about computers, if you want to tell a reader to enter some text, you can use the <kbd>…</kbd> element to indicate what should be typed in, as in this example.

Example

<p>This is a Regular text.</p>
<p><kbd>This is a kbd element</kbd></p>

Output

This is a Regular text.

This is a kbd element

Programming Variables

This element is usually used in conjunction with the <pre> and <code> elements to indicate that the content of that element is a variable used in computer programs.

Example

<p><code>document.write("<var>users</var>")</code></p>

Output

document.write("users")

Program Output

The <samp>…</samp> element indicates sample output from a program, and script etc. Again, it is mainly used when documenting programming or coding concepts.

Example

<p>The program output is <samp>Hello World!</samp></p>

Output

The program output is Hello World!

Sponsored Ads

In the next chapter you will learn some more Phrase Tags used for quotations.

Sponsored Ads

%d bloggers like this: