HTML TUTORIAL

Text Formating



There are a number of ways a Text may be required to be formatted. Most common formatting types are bold and italics . Here we will consider the major tags for formatting Text. There are additional text formatting available through attributes that we will consider later on.

<html>
<b> This is a bold text tag.</b>
<br />
<i>This is a italic text.</i>
<br />
<strong>
This is strong text.
What is the difference between strong and bold ? 
</strong>
<br />
<em>
This is emphasised text. 
What is the difference between italic and emphasised ? 
</em>
<br/>
<big> This is a big text tag.</big>
<br />
<small> This is a small text tag.</small>
<br />
<p> Pythagorus Theorem is x<sup>2</sup> + y<sup>2</sup> = z<sup>2</sup> .</p>
<p> There is superscript after this <sup> superscript </sup> .</p>
<p> There is subscript after this <sub> subscript </sub> .</p>
</body>
</html>


Most of the formatting are self obvious. The 0nly thing that may need a little explanation is the difference between bold and the strong. Visually they produce the same effect. However the tag strong is may be used by the intelligent speech synthesis programs to speak in a louder volume. Similar things apply for em tag. The strong and em tags are logical tags that can also be used by XML.

The pre tag



A tag the needs special explanation is the pre tag. The pre stands for preserve. The pre tag preserves the spacing between words and characters and also the spacing between lines. The example below best explains this,

Example - Understanding pre tag

att_name = 'outside "inside" outside'