HTML Formatting Tags

In order to display a bold or italic text in HTML, we use the formatting tags.

There are two types of tags:

  1. PHYSICAL tags
  2. LOGICAL tags
As Scripting Master describes the difference as follows...
physical character tag controls how the characters are formatted. For instance, you might display some characters as bold or italic. Listing 1 displays some common physical character tags. 
HTML codeOutput
This is <b>bold</b>This is bold
This is <big>big font</big>This is big font
This is <i>italic</i>This is italic
Was <s>$50</s>; now $40Was $50; now $40
This is <small>small</small>This is small
H<sub>2</sub>OH2O
May 5<sup>th</sup> 2005May 5th 2005
<tt>fixed-width font</tt>fixed-width font
This is <u>underlined</u>This is underlined
logical character tag describes how the text is being used, not necessarily how it is formatted. Listing 3 displays common examples logical character tags. 
HTML codeOutput
This is used for a short <cite>quote</cite>.This is used for a short quote.
<code>y = m * x + b</code>y = m * x + b
<del>Deleted</del> textDeleted text
<dfn>definition</dfn> textdefinition text
This is <em> emphasized </em>.This is emphasized .
<ins>inserted</ins> textinserted text
<kbd>code</kbd> samplecode sample
<samp>code</samp> samplecode sample
This is <strong>strong</strong>.This is strong.
<var>program</var> variableprogram variable

 
 
 

No comments:

Post a Comment

Extended Search

Custom Search
Hello World