Formatting and scrolling the text in web page


FORMATTING TAGS:
        There are a set of formatting tags in HTML, using which we can change the style of the text in the web page.

<b> or <strong> : used to display the text in bold face.
                                eg: <b> text </b>
                                       <strong> text </strong>
<i> or <em> : These tags are used to display the text in italic style.
                                eg: <i> text </i>
                                       <em> text </em>

<u> or <ins> : These tags are used to insert the line under the text.
                                eg: <u> text </u>
                                       <ins> text </ins>
<tt> TeliType : This tag is used to display text in 'telitype' font.
                                eg: <tt> text </tt>
<s> or <strike> or <del>: These tags are used to display the text as a deleted text.
                                eg: <s> hahaha </s>
                                      <strike> hahaha </strike>
                                      <del> hahaha </del>
<sub> Subscript : This tag is used to display the text below to the regular text. 
                                eg: O <sub> 2 </sub>  
<sup> superScript : This tag is used to display the text above the regular text. 
                                eg: A<sup> 2</sup> + B <sup> 2 </sup>
<small> : This tag slightly decrease the text size. 
                                eg: <small> text </some>
<big> : This tag slightly increase the text size.
                                eg: <big> text <big>
<center> : This tag is used to display the body content to the center of the web page.
                                eg: <center> text </center> 


 The following figure shows the program that uses all the formatting tags and its result follows. 




FONT TAG :This tag is used to customize the font styles of the text. Using font tag we can change color of the text, we can change font face, etc..This tag is represented as <font>.
  •  Attributes of Font:
  1. color: used to change the color of the selected text.
  2. size  : used to change the size of the selected text. we can specify the values between 1 to 7. 
  3. face  : used to change the font style.

eg: <font color="blue" size="6" face="Monotype Corsiva">  This is my web page... </font>
                                      
The following figure shows the usage of the font tag and its result follows:



<marquee> : This tag is used to display the scrolling text on the web page.
  • Attributes of marquee:
  1. direction : used to change the direction of the scrolling text.
  2. bgcolor   : used to change the background color of the scrolling text.
  3. scrollamount: used to specify the speed of the scrolling text.
  4. behaviour : used to change the behavior of scrolling text.
  5. loop: used to specify the no.of times to scroll.
eg: <marquee direction="right" scrollamount="10" bgcolor="yellow" behavior="alternate" loop="4" This is a scrolling text   </marquee>


No comments:

Post a Comment