SlideShare a Scribd company logo
1 of 20
The most important tags in HTML are tags that define headings, paragraphs, body and line breaks. The
basic HTML Tags are described here in the form of table so that you can remind them easily.



Basic HTML Tags



Tag     Description

<html> Defines an HTML document

<head>Defines information about the document

<title> Defines the document title

<body> Defines the document's body

<h1> to <h6>     Defines header 1 to header 6

<p>     Defines a paragraph

<br>    Inserts a single line break

<hr>    Defines a horizontal rule

<!-->   Defines a comment




Description Of The Above Tags



<html>tag

 This element tells a browser that this is an HTML document. This tag is defined at the top of the HTML
file and at the end of file.



Format:

<html> <body>..............body of HTML.............</body></html>
Example:

<html> <body> this is my first page </body></html>



<head> tag

 The head tag defines information about the document. The browser does not display the "head
information" to the user. The following tags can be in the head section: <base>, <link>, <meta>, <script>,
<style>, and <title>. The head tag is used between <html> and <body> tags.



Format:

<html> <head>.....head sections....</head><body>......body of HTML........</body></html>



Example:

<html> <head><title>Basic tag</title></head>>body> this is my first page </body></html>



<title> tag

Title tag defines the title of the document which appears in the Title bar of the explorer window. Title
tag is used in between <head> and </head> tag because it is title tag is section of <head> tag.



Format:

<html> <head><title>Title of the Page</title></head><body>.....body of HTML......</body></html>



Example:

<html> <head><title>Basic tag</title></head><body> this is my first page </body></html>



<body> tag
The body element defines the document's body. It contains all the contents of the document (like text,
images, colors, graphics etc).



Format:

<body bgcolor ="color_name" background="file_name" links="color_name" text="color_name">



Example:

<body bgcolor ="red" background="c:imgsky.jpg" links="blue" text="black">



Attributes



Attribute           Value Description

background           file_name           An image to use as the background. Deprecated. Use styles instead.

bgcolor color_name            The background color of the document. Deprecated. Use styles instead.

link, alink, vlink color_name            Specifies the color of all the links in the document. Deprecated. Use
styles instead.

text      color_name          Specifies the color of the text in the document. Deprecated. Use styles instead.




<hn>...</hn> Heading Tags

 These tags are used to display headings in an HTML document. through these tags you can increase the
size of the text. In these tags <h1> tag defines the largest header & <h6> defines smallest.



These tags are <h1> </h1>, <h2> </h2>, <h3> </h3>, <h4> </h4>, <h5> </h5>



Format:

<hn>.............. text..............</hn>
Example:

<h1> this is my first page </h1> or <h1 align="right">text</h1> Attribute of the <hn> Tag.



Attribute of the <hn> Tag

It has only one attribute i.e. Align="value" values may be right, left, center and justified. you can use this
align attribute in many tags to align the text or elements.



align value (right, center, left, justified)



<p>.....</p> Paragraph Tag

This tag is used for creating the paragraph in the web page. It is used inside the body of file.



Format:

<p>......longtext..........</p>



Example:

<p> This is the test of paragraph tag........</p>



In this tag align attribute can be used.



<br> tag

The <br> tag inserts a single line break. Use the <br> tag to enter blank lines, not to separate
paragraphs. This tag has no end tag.



Format
text........<br> .....text



Example:

This is a break <br> in the line.



<hr> tag

The <hr> tag inserts a horizontal rule. The <hr> tag has no end tag.



Format:

text......<hr> ......text or text......<hr align=" " size=" " width=" ">.... text



Example:

This is the test of the tag <hr>



Attribute

Attribute          Value Description

align      right,left,center         The alignment of the horizontal rule.

size      % , pixels         The thickness (height) of the horizontal rule.

width % , pixels             The width of the horizontal rule.




<!--...--> Comment Tag

 The comment tag is used to insert a comment in the source code. A comment will be ignored by the
browser. You can use comments to explain your code, which can help you when you edit the source
code at a later date.
You can also store program-specific information inside comments. In this case they will not be visible
for the user, but they are still available to the program. A good practice is to comment the text inside
the script and style elements to prevent older browsers, that do not support scripting or styles, from
showing it as plain text.



Format:

<!-- add here your comments these will not be displayed -->



Example:

<!-- add here your comments these will not be displayed -->



You might have became bored of reading so lets do some practical.



Follow these Steps:

copy this code in the new file of any text editor.

Save it with htm or html extension.

Open the Internet Browser.

Open the saved file in it.



Example:

<html>

<head>

<title>In body tag</title>

</head>

<body bgcolor="lightyellow" text="red">

In body tag, background color is defined as black and textcolor is defined as the white.

<hr>
<h1> this is the h1 header </h1>

<h2> this is the h2header </h2>

<h3> this is the h3 header </h3>

<h4> this is the h4 header </h4>

<h5> this is the h5 header </h5>

<hr>This is the use of "Break" tag<br> and you will see use of more tags<br>

<hr> look at the use of comment tag it is<!-- It is a comment line --> good

<hr><p> This is the use of paragraph tag and you will see use of more tags </p>

The effect of "hr" tag <br> <hr>

</body>

</html>




Explanation of the page:

The title of the page is at the top in blue strip. All the text appears in white color and background in the
black color. Because in the <body> tag the bgcolor and text color is defined. The horizontal line appears
because of the <hr> tag and the <br> tag breaks the text in between and displays it on new line. The



comment statement i

Character Format Tags



These tags are used for the formatting of the text such as underline, bold, italic, font, size, color of the
text.



All these character formatting Tags are defined in the table shown below:
Char Format Tag                Description

<b>        Displays bold text

<i>       Displays italic text

<tt>       Renders as teletype or mono spaced text

<u>        Displays underlined text

<em>       Displays emphasized text

<big>      Displays big text

<small> Displays small text

<strong>            Displays strong text

<sub> Displays subscripted text

<sup> Displays superscripted text

<bdo> Defines the direction of text display

<font> Defines the font face, size, and color of text




<b> Tag

The <b> tag is used to make the text bold.



Format:

<b> ................text.........</b>




<i> Tag

The <i> tag displays the italic text.
Format:

<i> ................text.........</i>;




<tt> Tag

The <tt> tag displays the typewriter text.



Format:

<tt> ................text.........</tt>




<u> Tag

The <u> tag displays the underlined text.



Format:

<u> ................text.........</u>




<em> Tag

The <em> tag displays the emphasized text.



Format:

<em> ................text.........</em>
<big> Tag

The <big> tag displays the big text.



Format:

<big> ................text.........</big>




<small> Tag

The <small> tag displays the small text.



Format:

<small> ................text.........</small>




<strong> Tag

The <strong> tag displays strong text.



Format:

<strong> ................text.........</strong>




<sub> Tag

The <sub> tag displays text in subscripted format.
Format:

<sub> ................text.........</sub>




<sup> Tag

The <sup> tag displays superscripted text.



Format:

<sup> ................text.........</sup>




<bdo> Tag

The <bdo> tag defines the direction of the text.



Format:

<bdo> ................text.........</bdo>




<font> Tag

The <font> tag defines the font, color, size of the text.



Format:

<font face="font_name" color="color_name" size="number">........text.........</font>



Examples of the Text Formatting tags
Examples          Outputs

<b>This text is bold</b>         This text is bold

<strong> This text is strong </strong> This text is strong

<big> This text is big </big>    This text is big

<em> This text is emphasized </em>         This text is emphasized

<i> This text is italic </i>     This text is italic

<small> This text is small </small>        This text is small;

This text contains <sub> subscript </sub>              This text contains subscript

This text contains <sup> superscript </sup>            This text contains superscript

<u> this is underlined text </u> this is underlined text

<bdo dir="rtl">Here is some Hebrew text</bdo> Here is some Hebrew text




You have read all the basic tags, So now lets do some practical.



Just write/copy this example on any text editor new file and save the file and open in the browser and
see how it looks.



Example:

<html>

<body>

<b>This text is bold</b>

<br>

<strong> This text is strong </strong>

<br>
<big> This text is big </big>

<br>

<em> This text is emphasized </em>

<br>

<i> This text is italic </i>

<br>

<small> This text is small </small>

<br>

<u> this is underlined text </u>

<br>

This text contains

<sub> subscript </sub>

<br>

This text contains

<sup> superscript </sup>

<br> The use of font tag

<font face="arial" size="3" color="green">

this is use of font tag</font>

</body>

</html>



Page in browser will Look Like:
Click Here! to see the animation of Character Format Tags.s not displayed.




Character Format Tags



These tags are used for the formatting of the text such as underline, bold, italic, font, size, color of the
text.



All these character formatting Tags are defined in the table shown below:



Char Format Tag          Description

<b>      Displays bold text

<i>     Displays italic text

<tt>     Renders as teletype or mono spaced text

<u>      Displays underlined text

<em>     Displays emphasized text

<big>    Displays big text

<small> Displays small text
<strong>              Displays strong text

<sub> Displays subscripted text

<sup> Displays superscripted text

<bdo> Defines the direction of text display

<font> Defines the font face, size, and color of text




<b> Tag

The <b> tag is used to make the text bold.



Format:

<b> ................text.........</b>




<i> Tag

The <i> tag displays the italic text.



Format:

<i> ................text.........</i>;




<tt> Tag

The <tt> tag displays the typewriter text.
Format:

<tt> ................text.........</tt>




<u> Tag

The <u> tag displays the underlined text.



Format:

<u> ................text.........</u>




<em> Tag

The <em> tag displays the emphasized text.



Format:

<em> ................text.........</em>




<big> Tag

The <big> tag displays the big text.



Format:

<big> ................text.........</big>
<small> Tag

The <small> tag displays the small text.



Format:

<small> ................text.........</small>




<strong> Tag

The <strong> tag displays strong text.



Format:

<strong> ................text.........</strong>




<sub> Tag

The <sub> tag displays text in subscripted format.



Format:

<sub> ................text.........</sub>




<sup> Tag

The <sup> tag displays superscripted text.



Format:
<sup> ................text.........</sup>




<bdo> Tag

The <bdo> tag defines the direction of the text.



Format:

<bdo> ................text.........</bdo>




<font> Tag

The <font> tag defines the font, color, size of the text.



Format:

<font face="font_name" color="color_name" size="number">........text.........</font>



Examples of the Text Formatting tags



Examples            Outputs

<b>This text is bold</b>                This text is bold

<strong> This text is strong </strong> This text is strong

<big> This text is big </big>           This text is big

<em> This text is emphasized </em>                This text is emphasized

<i> This text is italic </i>            This text is italic

<small> This text is small </small>               This text is small;
This text contains <sub> subscript </sub>        This text contains subscript

This text contains <sup> superscript </sup>      This text contains superscript

<u> this is underlined text </u> this is underlined text

<bdo dir="rtl">Here is some Hebrew text</bdo> Here is some Hebrew text




You have read all the basic tags, So now lets do some practical.



Just write/copy this example on any text editor new file and save the file and open in the browser and
see how it looks.



Example:

<html>

<body>

<b>This text is bold</b>

<br>

<strong> This text is strong </strong>

<br>

<big> This text is big </big>

<br>

<em> This text is emphasized </em>

<br>

<i> This text is italic </i>

<br>

<small> This text is small </small>

<br>
<u> this is underlined text </u>

<br>

This text contains

<sub> subscript </sub>

<br>

This text contains

<sup> superscript </sup>

<br> The use of font tag

<font face="arial" size="3" color="green">

this is use of font tag</font>

</body>

</html>



Page in browser will Look Like:




Click Here! to see the animation of Character Format Tags.

More Related Content

What's hot (19)

Html update1(30 8-2009)
Html update1(30 8-2009)Html update1(30 8-2009)
Html update1(30 8-2009)
 
html
htmlhtml
html
 
Html tag
Html tagHtml tag
Html tag
 
Practicals it
Practicals itPracticals it
Practicals it
 
HTML practical guide for O/L exam
HTML practical guide for O/L examHTML practical guide for O/L exam
HTML practical guide for O/L exam
 
html tags
html tagshtml tags
html tags
 
Hypertext_markup_language
Hypertext_markup_languageHypertext_markup_language
Hypertext_markup_language
 
Html Study Guide
Html Study GuideHtml Study Guide
Html Study Guide
 
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
HTML - LinkedIn
 
Hf html-cheat-sheet
Hf html-cheat-sheetHf html-cheat-sheet
Hf html-cheat-sheet
 
HTML and DHTML
HTML and DHTMLHTML and DHTML
HTML and DHTML
 
INTRODUCTION FOR HTML
INTRODUCTION  FOR HTML INTRODUCTION  FOR HTML
INTRODUCTION FOR HTML
 
Basics of Html
 Basics of Html Basics of Html
Basics of Html
 
Learning html & dhtml
Learning html & dhtmlLearning html & dhtml
Learning html & dhtml
 
HTML 4.0
HTML 4.0HTML 4.0
HTML 4.0
 
Web topic 5 text formatting
Web topic 5  text formattingWeb topic 5  text formatting
Web topic 5 text formatting
 
Html Study Guide - Heritage
Html Study Guide - HeritageHtml Study Guide - Heritage
Html Study Guide - Heritage
 
The Complete HTML
The Complete HTMLThe Complete HTML
The Complete HTML
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
 

Viewers also liked

Will online education prevail
Will online education prevailWill online education prevail
Will online education prevailvmontana33
 
Lavoro fotografia
Lavoro fotografiaLavoro fotografia
Lavoro fotografiamichele7
 
The empathy map
The empathy mapThe empathy map
The empathy mapvmontana33
 
Random Facts About Kayla
Random Facts About KaylaRandom Facts About Kayla
Random Facts About KaylaSapphireHeart
 
Avaition By Ambrose Barretto 2012-2013
Avaition By Ambrose Barretto 2012-2013Avaition By Ambrose Barretto 2012-2013
Avaition By Ambrose Barretto 2012-201387567543
 
Presentatie seniors BLK 2013 - tsjechië
Presentatie seniors BLK 2013 - tsjechiëPresentatie seniors BLK 2013 - tsjechië
Presentatie seniors BLK 2013 - tsjechiëPieter Jacxsens
 
Rekayasa web 0916 tugas 4 (individu)
Rekayasa web 0916 tugas 4 (individu)Rekayasa web 0916 tugas 4 (individu)
Rekayasa web 0916 tugas 4 (individu)Filsaf Kurniawan
 
00 introduzione
00 introduzione00 introduzione
00 introduzionejebb66
 
Diagrama de flujo
Diagrama de flujoDiagrama de flujo
Diagrama de flujojaider58
 

Viewers also liked (12)

Green cloud
Green cloudGreen cloud
Green cloud
 
Will online education prevail
Will online education prevailWill online education prevail
Will online education prevail
 
Lavoro fotografia
Lavoro fotografiaLavoro fotografia
Lavoro fotografia
 
The empathy map
The empathy mapThe empathy map
The empathy map
 
Random Facts About Kayla
Random Facts About KaylaRandom Facts About Kayla
Random Facts About Kayla
 
Avaition By Ambrose Barretto 2012-2013
Avaition By Ambrose Barretto 2012-2013Avaition By Ambrose Barretto 2012-2013
Avaition By Ambrose Barretto 2012-2013
 
Presentatie seniors BLK 2013 - tsjechië
Presentatie seniors BLK 2013 - tsjechiëPresentatie seniors BLK 2013 - tsjechië
Presentatie seniors BLK 2013 - tsjechië
 
Rekayasa web 0916 tugas 4 (individu)
Rekayasa web 0916 tugas 4 (individu)Rekayasa web 0916 tugas 4 (individu)
Rekayasa web 0916 tugas 4 (individu)
 
Tanda2 jatuh cinta
Tanda2 jatuh cintaTanda2 jatuh cinta
Tanda2 jatuh cinta
 
00 introduzione
00 introduzione00 introduzione
00 introduzione
 
Diagrama de flujo
Diagrama de flujoDiagrama de flujo
Diagrama de flujo
 
Adab makan dan minum
Adab  makan dan minumAdab  makan dan minum
Adab makan dan minum
 

Similar to HTML tags for headings, paragraphs and formatting text

Similar to HTML tags for headings, paragraphs and formatting text (20)

Html tutorials
Html tutorialsHtml tutorials
Html tutorials
 
Html tutorials
Html tutorialsHtml tutorials
Html tutorials
 
Html tags
Html tagsHtml tags
Html tags
 
SDP_HTML.pptx
SDP_HTML.pptxSDP_HTML.pptx
SDP_HTML.pptx
 
Html tags
Html tagsHtml tags
Html tags
 
HTML
HTMLHTML
HTML
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
HTML.pdf
HTML.pdfHTML.pdf
HTML.pdf
 
Html1
Html1Html1
Html1
 
Computer language - HTML tags
Computer language - HTML tagsComputer language - HTML tags
Computer language - HTML tags
 
HTML Tags
HTML TagsHTML Tags
HTML Tags
 
TagsL1.pptx
TagsL1.pptxTagsL1.pptx
TagsL1.pptx
 
Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangaloreHtml ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangalore
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
 
Chapter 6 html
Chapter 6 htmlChapter 6 html
Chapter 6 html
 
Hyper Text Mark-up Language
Hyper Text Mark-up Language Hyper Text Mark-up Language
Hyper Text Mark-up Language
 
Html2
Html2Html2
Html2
 
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdfHSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
 
Html basics 3 font align
Html basics 3 font alignHtml basics 3 font align
Html basics 3 font align
 
Html
HtmlHtml
Html
 

HTML tags for headings, paragraphs and formatting text

  • 1. The most important tags in HTML are tags that define headings, paragraphs, body and line breaks. The basic HTML Tags are described here in the form of table so that you can remind them easily. Basic HTML Tags Tag Description <html> Defines an HTML document <head>Defines information about the document <title> Defines the document title <body> Defines the document's body <h1> to <h6> Defines header 1 to header 6 <p> Defines a paragraph <br> Inserts a single line break <hr> Defines a horizontal rule <!--> Defines a comment Description Of The Above Tags <html>tag This element tells a browser that this is an HTML document. This tag is defined at the top of the HTML file and at the end of file. Format: <html> <body>..............body of HTML.............</body></html>
  • 2. Example: <html> <body> this is my first page </body></html> <head> tag The head tag defines information about the document. The browser does not display the "head information" to the user. The following tags can be in the head section: <base>, <link>, <meta>, <script>, <style>, and <title>. The head tag is used between <html> and <body> tags. Format: <html> <head>.....head sections....</head><body>......body of HTML........</body></html> Example: <html> <head><title>Basic tag</title></head>>body> this is my first page </body></html> <title> tag Title tag defines the title of the document which appears in the Title bar of the explorer window. Title tag is used in between <head> and </head> tag because it is title tag is section of <head> tag. Format: <html> <head><title>Title of the Page</title></head><body>.....body of HTML......</body></html> Example: <html> <head><title>Basic tag</title></head><body> this is my first page </body></html> <body> tag
  • 3. The body element defines the document's body. It contains all the contents of the document (like text, images, colors, graphics etc). Format: <body bgcolor ="color_name" background="file_name" links="color_name" text="color_name"> Example: <body bgcolor ="red" background="c:imgsky.jpg" links="blue" text="black"> Attributes Attribute Value Description background file_name An image to use as the background. Deprecated. Use styles instead. bgcolor color_name The background color of the document. Deprecated. Use styles instead. link, alink, vlink color_name Specifies the color of all the links in the document. Deprecated. Use styles instead. text color_name Specifies the color of the text in the document. Deprecated. Use styles instead. <hn>...</hn> Heading Tags These tags are used to display headings in an HTML document. through these tags you can increase the size of the text. In these tags <h1> tag defines the largest header & <h6> defines smallest. These tags are <h1> </h1>, <h2> </h2>, <h3> </h3>, <h4> </h4>, <h5> </h5> Format: <hn>.............. text..............</hn>
  • 4. Example: <h1> this is my first page </h1> or <h1 align="right">text</h1> Attribute of the <hn> Tag. Attribute of the <hn> Tag It has only one attribute i.e. Align="value" values may be right, left, center and justified. you can use this align attribute in many tags to align the text or elements. align value (right, center, left, justified) <p>.....</p> Paragraph Tag This tag is used for creating the paragraph in the web page. It is used inside the body of file. Format: <p>......longtext..........</p> Example: <p> This is the test of paragraph tag........</p> In this tag align attribute can be used. <br> tag The <br> tag inserts a single line break. Use the <br> tag to enter blank lines, not to separate paragraphs. This tag has no end tag. Format
  • 5. text........<br> .....text Example: This is a break <br> in the line. <hr> tag The <hr> tag inserts a horizontal rule. The <hr> tag has no end tag. Format: text......<hr> ......text or text......<hr align=" " size=" " width=" ">.... text Example: This is the test of the tag <hr> Attribute Attribute Value Description align right,left,center The alignment of the horizontal rule. size % , pixels The thickness (height) of the horizontal rule. width % , pixels The width of the horizontal rule. <!--...--> Comment Tag The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.
  • 6. You can also store program-specific information inside comments. In this case they will not be visible for the user, but they are still available to the program. A good practice is to comment the text inside the script and style elements to prevent older browsers, that do not support scripting or styles, from showing it as plain text. Format: <!-- add here your comments these will not be displayed --> Example: <!-- add here your comments these will not be displayed --> You might have became bored of reading so lets do some practical. Follow these Steps: copy this code in the new file of any text editor. Save it with htm or html extension. Open the Internet Browser. Open the saved file in it. Example: <html> <head> <title>In body tag</title> </head> <body bgcolor="lightyellow" text="red"> In body tag, background color is defined as black and textcolor is defined as the white. <hr>
  • 7. <h1> this is the h1 header </h1> <h2> this is the h2header </h2> <h3> this is the h3 header </h3> <h4> this is the h4 header </h4> <h5> this is the h5 header </h5> <hr>This is the use of "Break" tag<br> and you will see use of more tags<br> <hr> look at the use of comment tag it is<!-- It is a comment line --> good <hr><p> This is the use of paragraph tag and you will see use of more tags </p> The effect of "hr" tag <br> <hr> </body> </html> Explanation of the page: The title of the page is at the top in blue strip. All the text appears in white color and background in the black color. Because in the <body> tag the bgcolor and text color is defined. The horizontal line appears because of the <hr> tag and the <br> tag breaks the text in between and displays it on new line. The comment statement i Character Format Tags These tags are used for the formatting of the text such as underline, bold, italic, font, size, color of the text. All these character formatting Tags are defined in the table shown below:
  • 8. Char Format Tag Description <b> Displays bold text <i> Displays italic text <tt> Renders as teletype or mono spaced text <u> Displays underlined text <em> Displays emphasized text <big> Displays big text <small> Displays small text <strong> Displays strong text <sub> Displays subscripted text <sup> Displays superscripted text <bdo> Defines the direction of text display <font> Defines the font face, size, and color of text <b> Tag The <b> tag is used to make the text bold. Format: <b> ................text.........</b> <i> Tag The <i> tag displays the italic text.
  • 9. Format: <i> ................text.........</i>; <tt> Tag The <tt> tag displays the typewriter text. Format: <tt> ................text.........</tt> <u> Tag The <u> tag displays the underlined text. Format: <u> ................text.........</u> <em> Tag The <em> tag displays the emphasized text. Format: <em> ................text.........</em>
  • 10. <big> Tag The <big> tag displays the big text. Format: <big> ................text.........</big> <small> Tag The <small> tag displays the small text. Format: <small> ................text.........</small> <strong> Tag The <strong> tag displays strong text. Format: <strong> ................text.........</strong> <sub> Tag The <sub> tag displays text in subscripted format.
  • 11. Format: <sub> ................text.........</sub> <sup> Tag The <sup> tag displays superscripted text. Format: <sup> ................text.........</sup> <bdo> Tag The <bdo> tag defines the direction of the text. Format: <bdo> ................text.........</bdo> <font> Tag The <font> tag defines the font, color, size of the text. Format: <font face="font_name" color="color_name" size="number">........text.........</font> Examples of the Text Formatting tags
  • 12. Examples Outputs <b>This text is bold</b> This text is bold <strong> This text is strong </strong> This text is strong <big> This text is big </big> This text is big <em> This text is emphasized </em> This text is emphasized <i> This text is italic </i> This text is italic <small> This text is small </small> This text is small; This text contains <sub> subscript </sub> This text contains subscript This text contains <sup> superscript </sup> This text contains superscript <u> this is underlined text </u> this is underlined text <bdo dir="rtl">Here is some Hebrew text</bdo> Here is some Hebrew text You have read all the basic tags, So now lets do some practical. Just write/copy this example on any text editor new file and save the file and open in the browser and see how it looks. Example: <html> <body> <b>This text is bold</b> <br> <strong> This text is strong </strong> <br>
  • 13. <big> This text is big </big> <br> <em> This text is emphasized </em> <br> <i> This text is italic </i> <br> <small> This text is small </small> <br> <u> this is underlined text </u> <br> This text contains <sub> subscript </sub> <br> This text contains <sup> superscript </sup> <br> The use of font tag <font face="arial" size="3" color="green"> this is use of font tag</font> </body> </html> Page in browser will Look Like:
  • 14. Click Here! to see the animation of Character Format Tags.s not displayed. Character Format Tags These tags are used for the formatting of the text such as underline, bold, italic, font, size, color of the text. All these character formatting Tags are defined in the table shown below: Char Format Tag Description <b> Displays bold text <i> Displays italic text <tt> Renders as teletype or mono spaced text <u> Displays underlined text <em> Displays emphasized text <big> Displays big text <small> Displays small text
  • 15. <strong> Displays strong text <sub> Displays subscripted text <sup> Displays superscripted text <bdo> Defines the direction of text display <font> Defines the font face, size, and color of text <b> Tag The <b> tag is used to make the text bold. Format: <b> ................text.........</b> <i> Tag The <i> tag displays the italic text. Format: <i> ................text.........</i>; <tt> Tag The <tt> tag displays the typewriter text.
  • 16. Format: <tt> ................text.........</tt> <u> Tag The <u> tag displays the underlined text. Format: <u> ................text.........</u> <em> Tag The <em> tag displays the emphasized text. Format: <em> ................text.........</em> <big> Tag The <big> tag displays the big text. Format: <big> ................text.........</big>
  • 17. <small> Tag The <small> tag displays the small text. Format: <small> ................text.........</small> <strong> Tag The <strong> tag displays strong text. Format: <strong> ................text.........</strong> <sub> Tag The <sub> tag displays text in subscripted format. Format: <sub> ................text.........</sub> <sup> Tag The <sup> tag displays superscripted text. Format:
  • 18. <sup> ................text.........</sup> <bdo> Tag The <bdo> tag defines the direction of the text. Format: <bdo> ................text.........</bdo> <font> Tag The <font> tag defines the font, color, size of the text. Format: <font face="font_name" color="color_name" size="number">........text.........</font> Examples of the Text Formatting tags Examples Outputs <b>This text is bold</b> This text is bold <strong> This text is strong </strong> This text is strong <big> This text is big </big> This text is big <em> This text is emphasized </em> This text is emphasized <i> This text is italic </i> This text is italic <small> This text is small </small> This text is small;
  • 19. This text contains <sub> subscript </sub> This text contains subscript This text contains <sup> superscript </sup> This text contains superscript <u> this is underlined text </u> this is underlined text <bdo dir="rtl">Here is some Hebrew text</bdo> Here is some Hebrew text You have read all the basic tags, So now lets do some practical. Just write/copy this example on any text editor new file and save the file and open in the browser and see how it looks. Example: <html> <body> <b>This text is bold</b> <br> <strong> This text is strong </strong> <br> <big> This text is big </big> <br> <em> This text is emphasized </em> <br> <i> This text is italic </i> <br> <small> This text is small </small> <br>
  • 20. <u> this is underlined text </u> <br> This text contains <sub> subscript </sub> <br> This text contains <sup> superscript </sup> <br> The use of font tag <font face="arial" size="3" color="green"> this is use of font tag</font> </body> </html> Page in browser will Look Like: Click Here! to see the animation of Character Format Tags.