Previous Next

HTML Phrase Tags


 

HTML <em> Element

The element <em> defines emphasized text.

This is similar to italicised <i> text.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Emphasized Text Example</title>
   </head>
   <body>
      <p>This is <em>emphasized</em> text.</p>
   </body>
</html>

Result:

This is emphasized text.

 


 

HTML <strong> Element

The element <strong> defines strong text.

This is similar to bold <b> text.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Strong Text Example</title>
   </head>
   <body>
      <p>This is <strong>strong</strong> text.</p>
   </body>
</html>

Result:

This is a strong text.


 

HTML <abbr> Element

The element <abbr> defines abbreviations. 

If the element contains <abbr>, then the title attribute must contain this full description of this.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Text Abbreviation</title>
   </head>
   <body>
      <p>This is <abbr title="Abbreviation">abbr</abbr> text.</p>
   </body>
</html>

Result:

This is abbr text.


 

HTML <Acronym> Element

The element <acronym> defines acronym text. 

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Acronym Example</title>
   </head>
   <body>
      <p>This is <acronym>HTML</acronym> tutorial.</p>
   </body>
</html>

Result:

This is HTML tutorial.


 

HTML <bdo> Element

The element <bdo> overrides text direction.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Text Direction Example</title>
   </head>
   <body>
      <p>This text is left to right.</p>
      <p><bdo dir="rtl">This text is right to left.</bdo></p>
   </body>
</html>

Result:

This text is left to right.

This text is right to left.


 

HTML <dfn> Element

The <dfn> (HTML definition) element defines special texts in italic form.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Special Terms Example</title>
   </head>
   <body>
      <p>This is a <dfn>special</dfn> term.</p>
   </body>
</html>

Result:

This is a special term.


 

HTML <blockquote> Element

The element <blockquote> defines quoted text, from another source.

This is usually indented from left 

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Blockquote Example</title>
   </head>
   <body>
      <blockquote>HyperText Markup Language (HTML) is the standard markup language for creating web pages and web applications.</blockquote>
   </body>
</html>

Result: 

HyperText Markup Language (HTML) is the standard markup language for creating web pages and web applications.

 

HTML <q> Element

The element <q> is used to add a double quote to a sentence.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Double Quote Example</title>
   </head>
   <body>
      <p><q>Hello World</q>.</p>
   </body>
</html>

Result:

Hello World.


 

HTML <cite> Element

The element <cite> can be used to represent source of a quote.

This is displayed is italicised form.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Citations Example</title>
   </head>
   <body>
      <p>This HTML tutorial is derived from <cite>W3 Standard for HTML</cite>.</p>
   </body>
</html>

Result:

This HTML tutorial is derived from W3 Standard for HTML.


 

HTML <code> Element

The element <code> defines programming code.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Code Example</title>
   </head>
   <body>
      <p>This is <code>code</code> text.</p>
   </body>
</html>

Result:

This is code text. 


 

HTML <kbd> Element

The element <kbd> is used to represent keyboard keys.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Keyboard Text Example</title>
   </head>
   <body>
      <p>This is <kbd>keyboard</kbd> text.</p>
   </body>
</html>

Result:

This is keyboard text.


 

HTML <var> Element

The element <var> is used to represent programming variable.

This is used with <pre> and <code> elements.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Variable Text Example</title>
   </head>
   <body>
      <p><code>document.write("<var>age</var>")</code></p>
   </body>
</html>

Result:

document.write("age")


 

HTML <samp> Element

The element <samp> is used to represent the outcome of a program. 

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Program Outcome Example</title>
   </head>
   <body>
      <p>output is <samp>Hello World!</samp></p>
   </body>
</html>

Result:

Ouput is Hello World!


 

Address Text

The element <address> is used to contain any address.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>Address Example</title>
   </head>
   <body>
      <address>Kentucky 40170, USA</address>
   </body>
</html>

Result:

Kentucky 40170, USA

Previous Next