Formatting Tags Bold Italic Underline

Formatting Tags :Bold , Italic, Underline

SECTION HEADING: <H1>.............<H6>

HTML has six header tags <H1>, <H2>...........<H6> used to specify section headings. Text with header tags is displayed in larger and bolder fonts than the normal body text by a web browser. Every header leaves a blank line above and below it when displayed in browser.

Section Heading
<H1>This is Section Heading 1 </H1>
<H2>This is Section Heading 2 </H2>
<H3>This is Section Heading 3 </H3>
<H4>This is Section Heading 4 </H4>
<H5>This is Section Heading 5 </H5>
<H6>This is Section Heading 6 </H6>

Paragraph tag: <P></P>

This tag <P> indicates a paragraph, used to separate two paragraphs with a blank line.


<P> Welcome to the world of HTML </P>
<P> First paragraph.
Text of First paragraph goes here </P>

Line Break Tag: <BR>

The empty tag <BR> is used, where the text needs to start from a new line and not continue on the same line. To get every sentence on a new line, it is necessary to use a line break.


INfomaxComputer Academy <BR>
G. R. Complex Preetam Nagar <BR>
Allahabad 211011

Preformatted Text Tag: <PRE>

<PRE> tag can be used, where it requires total control over spacing and line breaks such as typing a poem. Browser preserves your space and line break in the text written inside the tag.


Infomax Computer Academy
G. R. COmplex  Preetam Nagar
Allahabad 211011</PRE>

Using Horizontal Rule Tag: <HR/>

An empty tag <HR> basically used to draw lines and horizontal rules. It can be used to separate two sections of text.


Your horizontal rule goes here. <HR/>
The rest of the text goes here.

Attributes of <HR/> Tag:

SIZE: Determines the thickness of the horizontal rule. The value is given as a pixel value.


<HR SIZE="3"/>

WIDTH: Specifies an exact width of HR in pixels, or alternative width as percentage of the document width.


<HR WIDTH="50%"/>

horizontal rule a width a 50 percent of the page width.

ALIGN: Set the alignment of the rule to LEFT, RIGHT and CENTER. It is applicable if it is not equal to width of the page.

NOSHADE: If a solid bar is required, this attribute is used; it specifies that the horizontal rule should not be shaded at all.

COLOR: Set the color of the Horizontal rule.



Character Formatting Tags

The character formatting tags are used to specify how a particular text should be displayed on the screen to distinguish certain characters within the document. The most common character formatting tags are:

Boldface <B>: displays text in BOLD


Welcome to the <B> Internet World </B>

Italics <I>: displays text in Italic


Welcome to the <I> Internet World </I>

Underline <U>: displays text in UNDERLINE


Welcome to the <U> Internet World </U>

Subscript <SUB>: displays text in Subscript



Superscript <SUP>: displays text in Superscript



Small <SMALL>: displays text in smaller font as compared to normal font

Big <BIG>: displays text in larger font as compared to normal font

Font Colors, Size and Face:<FONT>

By using <FONT> Tag one can specify the colors, size and face of the text.


<FONT> Your text goes here </FONT>

Attributes of <FONT>Tag:

COLOR: Sets the color of the text that will appear on the screen. It can be set by giving the value as #rr0000 for red in RGB hexadecimal format), or by name.


<FONT COLOR="RED">your text goes here </FONT>

SIZE: Sets the size of the text, takes value between 1 and 7, default is 3. Size can also be set relative to default size for example; SIZE=+X, where X is any integer value and it will add with the default size.


<FONT SIZE= “5”> Font Size changes to 5 </FONT>
<FONT SIZE= “+2”> Font Size changes to 5 i.e. default size (3) ±2</FONT>

FACE: Sets the normal font type, provided it is installed on the user’s machine.


<FONT FACE="ARIAL"> the text will be displayed in Arial</FONT>

Using Some Special Characters (HTML ENTITY) 

There are certain special characters that


Example Programs

Program [1]

Create an html page with following specifications : Title should be about Gateway of India. Place City name at the top of the page in large text and in blue color. Add pictures taken from different angles/views, add label and caption with each picture. Give Alternate Text on each image. Use a different color, style and typeface in the text. One of the landmark, Mumbai should be blinking. Add scrolling text with a message of your choice.

View Solution

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Website development Company in Allahabad Sarkari Exam Quiz