3.5 HTML Text Formatting

HTML offers you two ways in which you can emphasize your text:  with logical markers and physical markers.  Logical markers allow your users to choose how to view important text for example in bold, red lettering say in all their web pages, while physical formatting appears how you, the page’s designer wanted it to be.

Logical styles

The logical style informs the browser what kind of text to present.  The browser takes care of how to present it.  For example the <STORNG> tag tells  the browser that strong emphasis must be given.  The browser takes care of how to present it, so that it gets the strong emphasis required.  The following are some of the logical style tags.

<EM>…</EM> Basic emphasis.  Normally rendered in italic style.
<STRONG>…</STRONG> Strong emphasis.  Normally rendered in bold style.
<SAMP>…</SAMP>  Sample outputs from programs, scripts etc.
<CODE>…</CODE> Extracts of program code
<VAR>….</VAR> Variables or arguments to commands
<CITE>….</CITE> Citation of reference to other sources.


Physical style

Physical style format tags explicitly inform the browser how the characters must be shown, whether in bold, italics etc.  The following are some of the physical style tags.

<B>….</B> Bold face
<I>…</I> Italics
<U>……</U> Underline
<STRIKE> </STRIKE> Strike through
<SUB>….</SUB> Subscript
<SUP>….</SUP> Superscript
<BIG>….</BIG> Larger font
<SMALL>….</SMALL> Smaller font


Tips:  Note all browsers can display all text formatting, Eg. <STRIKE> is not supported by some browsers.

Font Tag

The <FONT> tag is used to set specific font and size.  It usually has two attributes, namely face and size.



Web technologies by David Hunter


Pre, P and BR tags

The <PRE> tag can be used to display content in preformatted text which is a typographic font.  You can use a <BR> tag to insert a line break in your document.  Inorder to start a new paragraph you could use the <P> tag.

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Get Alert

    Enter your email address:

  • Categories

  • Twitter

Subscribe Now!
Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.

Subscribe Here

Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter