HTML Tags

By | January 4, 2017
HTML Tags

HTML Tags

HTML Tags – HTML tags are the hidden keywords within a web page that define how the browser must format and display the content. Most tags must have two parts, an opening and a closing part. For example –

<html> is the opening tag.

</html> is the closing tag.

There are many html tags. Some are –

  • Heading tags.
  • Paragraph tag.
  • Line Break tag.
  • Tag for centering content.
  • Horizontal lines tag.

Heading Tags – HTML has six levels of headings for different sizes of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. For Example –

<html>

<title>title name</title>

<body>

<h1>This is first heading</h1>

<h2>This is second heading</h2>

<h3>This is third heading</h3>

<h4>This is fourth heading</h4>

<h5>This is fifth heading</h5>

<h6>This is sixth heading</h6>

</body>

</html>

Outputs are –

This is first heading

This is second heading

This is third heading

This is fourth heading

This is fifth heading
This is sixth heading

Paragraph tag – For Paragraph tag is <p></p>

Example

<html>

<title>title name</title>

<body>

 

<p>This is first paragraph</p>

<p>This is second paragraph</p>

</body>

</html>

Outputs is –

This is first paragraph

This is second paragraph

Line Break tag – For Line Break tag is <br/>

Example

<html>

<title>title name</title>

<body>

This is first paragraph. <br/>This is second paragraph.

</body>

</html>

Outputs is –

This is first paragraph.

This is second paragraph.

Tag For centering Content – For centering content tag is –

 

<center></center>

Example

<html>

<title>title name</title>

<body>

This is first paragraph

<center>This is second paragraph</center>

</body>

</html>

Outputs is –

This is first paragraph

This is second paragraph

 Horizontal lines tag – For Horizontal lines tag is – <hr/>. For Horizontal lines, no need opening and closing tag.

Example

<html>

<title>title name</title>

<body>

This is first paragraph<hr/>This is second paragraph

</body>

</html>

Outputs is –

This is first paragraph


This is second paragraph

Leave a Reply

Your email address will not be published. Required fields are marked *