HTML Text Formatting

Often you would have seen that the important text is either bold or italic. This is done to gather the visitor’s attention.Emphasizing text is very common in webpages.Now in this tutorial you will learn about HTML Tags used to format text.
This text is bold.
This text is italic.
This issuperscript and this is subcript.

Text Formats In HTML

The text on a web page can be formatted in various ways, most common being bold or italic.But HTML offers a variety of tags.Given below is a list of tags and their details.

 Defines superscripted text Defines deleted text

Tag Detail
Defines underlined text
< code> Defines computer code text
Defines bold text
Defines Strong text

HTML Formatting Tags Examples

To make a text bold,underlined you just need to write the text between the corresponding tag.Here is a an example

Text is bold
Text is italic
Text issuperscript
Text is subscript
Text is underlined
Text is Big

Result in browser is displayed as:
Text is bold
Text is italic
Text issuperscript
Text is subscript
Text is underlined
Text is Big

HTML <PRE> TAG

You must have observed while creating webpages that the browser ignores the empty spaces and line breaks in the document.But in cases such as in a computer we want to display the text according to our layout,so we use < pre> tag.

This is pre tag.
The empty spaces    and line breaks are
preserved.

Best used in computer codes.

if(a>=5)
  {
   if(a%5==0)
      printf("Divisble by 5");
   else
      printf("Not divisble by 5");
  }
     
 

The result of the above is:

This is pre tag.
The empty spaces    and line breaks are
preserved.

Best used in computer codes.

if(a>=5)
  {
   if(a%5==0)
      printf("Divisble by 5");
   else
      printf("Not divisble by 5");
  }
     


Previous:HTML Email links Next:HTML Reset Button

css.php