Skip to main content

Basic Formatting Tags of HTML - 4

Heading Tags

It is used for applying headings of different sizes to the web page. Headings are defined with the <h1>,<h2>,<h3> , <h4>,<h5> , <h6>.

Example

<html>

<head>
<title>
headings tag</title>
</head>
<body>
<h1>education</h1>
<h2>education</h2>
 <h3>education</h3>
 <h4>education</h4>
 <h5>education</h5>
 <h6>education</h6>
</body>
</html>

Paragraph  Formatting

<p></p> tag is used to define the block of the text as paragraph. It has only one attribute which is defined below


Attribute
Value
Description
align
Left or Right or Center or Justify
By default the  alignment of the paragraph is LEFT.

Example

<html>
<head>
<title>
paragraph tag
</title>
</head>
<body>
<p>
Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.
</p>
</body>
</html>

Paragraph Tag with Alignment

Example

<html>
<head>
<title>
paragraph tag
</title>
</head>
<body>
<p align="center">
Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.
</p>
</body>
</html>

Comment Tag

<comment></comment> tag is used not to display the matter defined inside the tag.  Types of comment tags


Tags
comment></comment>
<!--   -->

Example

<html>

<head>
<title>comment tag</title>
</head>
<body>
<comment> Hello World</comment>
Education times
<!--Education-->
</body>
</html>

Line Break

<br> tag is used to break the line. In the web page where ever you apply the <br> tag from their on the  matter will  moves to the next line.

Example

<html>
<head>
<title>
line break
</title>
<body>
Hello Tina
<br>
How are you?
</body>
</html>

Horizontal Rule

<hr> tag  represents a thematic change in the web page. This tag draws a horizontal line across the whole page. The attributes of the <hr> tag


Attribute
Value
Description
Align
Left or Right or Center
By default the alignment of the <hr> tag is center

If the align=”left” then the horizontal line appears on left  hand side

If the align=”right” then the horizontal line appears on right hand side
Size
Value in pixel or %
Change the size of the <hr> tag
Color
Colorname
Apply  the color on the <hr> tag
Width
Value in pixel or %
Sets the width of the rule.

NEXT

Comments

Popular posts from this blog

Lists in HTML - Unordered List

Unordered List An Unordered List is a collection of item that is not  in sequential order. It starts with the <ul> tag and ends with the </ul> tag. Each list item starts with the <li> tag. Each item is marked with the bullet i.e . with the disc or square or circle.  By default the tag starts with the disc . It is also called Bulleted list. Tags of Unordered List <ul> </ul> <li></li> Example    Write a  program to print the list given below pen pencil book <html> <head> <title> unordered list </title> </head> <body> <ul> <li>pen</li> <li>pencil</li> <li>book</li> </ul> </body> </html> Example of Attributes of <ul> tag with the Type attributes Write a program to print the list given below <html> <head> <title> unordered list </title> </head...

Lists in HTML - Definition List

Definition lists is used to define the term and with  its description. It starts with the <DL> and endswith the </DL> tag The data term is defined inside the <DT> and </DT> tag. The data description is defined inside the tag <DD>and  </DD>. It has no attributes. Tags of Definition List <DL></DL> <DT></DT> <DD></DD> Example  <html> <head> <title> definition list </title> </head> <body> <dl> <dt>Word</dt> <dd> word is a word processor</dd> <dt>excel</dt> <dd> Excel is a spread sheet</dd> </dl> </body> </html> This will produce the following output Menu List It is used for creating menu list. It is created with the help of   <menu></menu> and <li></li> . Example <html> <head> <title> me...

Linking in html

Linking is used for linking the web page with the another web page. One can create linking with  <a> </a> tag. It is also called anchor tag. One can create linking with the text, linking with the image. The attribute of <a></a> href="path" target="frame name" or _top or _blank or _self or _parent Linking with the Text  One can create linking with the text. Example of it is given below   Example <html> <head> <title> linking with text </title> </head> <body> <a href="file:///C:/Program%20Files/Java/jre1.8.0_31/Welcome.html">click here</a> </body> </html> The output of the above  code is Linking with Image Now, one can also create linking with the image. Example <html> <head> <title> linking with image </title> </head> <body> <a href="file:///C:/Program%20Files/Java/jre1.8.0_31/Wel...