Wednesday, January 19, 2011

HTML Text Formatting

Open your text editor and type the following:

<html>
<head>
<title>Nebula Technologies Pvt Ltd</title>
</head>
<body>
</body>
</html>

  • Save the file as exo2.htm and preview it in the browser then return to your text editor
  • Everything you want to display on a web page is typed between the and the tags. 
  • For example, in the empty line between and , without pressing Enter, type: 
    • Located in the heart of Rockville, Maryland, the Grier Summer Camp is an attractive tourist setting aimed at entertaining and supporting youth activities during their summer vacation. Our youth programs and activities are as intense and stimulating as E=mc2 yet as lively as H2O.
  • Press Enter
  • You can make a character, a word or a group of words display following a certain style, for example italic, bold, or underline.

    To display a character, a word, or a group of words in italic, include it or them between the and the tags.
    To see an example, surround the word Rockville as follows: Rockville  
  • Save the file and preview it in the browser.
  • If you are using Internet Explorer, on its main menu, click View -> Refresh. Notice how Rockville displays now
  • Return to your text editor
  • To use the underline style, you   can include the desired character, word or group of words between the <u>   and the </u> tags.
  •  To see an example, change the Maryland word to   look as follows:
<u>Maryland</u>

  • Save the file and preview it
  • To use the bold style, you include the desired character, words or group of words between the and the tags. The and the tags can also be used for the bold style. The and tags can be used to display text in big font. On the other hand, the and tags are used to display small characters.

    To see an example, on the long paragraph, change the following words to look as follows:
    <b>Grier Summer Camp</b>
  • Save the file and preview it.
  • Notice that the company name now displays in bold characters.
  • You can also combine styles to assign them to a character, a word, or a group of words. Simply type each desired tag at the intended beginning. There is no rule on the order of the tag, but although you can combine as many opening tags as you desire, you need to close them in reverse order. This means that, if you start with and follow with then type the word or group of words you want, in this case you would first close with followed by .

    To see an example, surround summer vacation as follows:
    summer vacation
  • Save the file. Preview it in the browser. Return to your text editor.
  • You can also strike through a text. To do that, use the <strike> and tags or the and tags.

    To see an example, make the following change:
    1st change: heart2nd change: is an
  • Some science or other documents   include characters that need to elevate or lower themselves in order to display   some formula. The <sub> and </sub> tags are used to display   characters as subscript text. On the other hand, the <sup> and   </sup> tags are used to display characters in superscript text.
  • E=mc<sup>2</sup> yet  as H<sub>2</sub>O.
  • Save the file. Preview it in the browser:
  • Return to your text editor that you can close at this time.

No comments:

Post a Comment