Body Tag - Part 2
Web page content is beautifully arranged using different tags in the body section. Gradually we will learn about all the tags.
- Heading tag
Using this tag the size of the title text is made bigger or smaller.
<h1>, <h2>, <h3>, <h4>, <h5>, <h6> - The title is given using these six tags.
EXAMPLE:
<html> <head> <title> </title> </head> <body> <h1> Heading Tag 1 </h1> <h2> Heading Tag 2 </h2> <h3> Heading Tag 3 </h3> <h4> Heading Tag 4 </h4> <h5> Heading Tag 5 </h5> <h6> Heading Tag 6 </h6> </body> </html>
|
|
- Align - It is a Attribute
The title is usually from the left side of the web page. If you need to change the title position you could do with the align tag
EXAMPLE:
<html> <head> <title> </title> </head> <body> <h1 align="left"> Heading - Left Alignment </h1> <h2 align="center"> Heading - Center Alignment</h2> <h3 align="right"> Heading - Right Alignment</h3> <h4 align="justify"> Heading - Justify Alignment</h4> </body> </html>
|
|
<h1 align="left" > Heading Tag 1 - Left Alignment </h1>
- The heading will start from the left side of the web page (It is default).
<h1 align="center" > Heading Tag 1 - Center Alignment</h1>
- The heading will start from the middle of the web page.
<h1 align="right" > Heading Tag 1 - Right Alignment</h1>
- The heading will start from the right side of the web page.
<h1 align="justify" > Heading Tag 1 - Justify Alignment</h1>
- If the heading is too large then there will be equal space on both sides of the web page.
- P tag or Paragraph tag
Using this tag we could be create Paragraphs.
EXAMPLE:
<html> <head> <title> </title> </head> <body> <p> The sea, connected as the world ocean or simply the ocean, </p> is the body of salty water that covers over 70 percent of the Earth's surface. </body> </html>
|
|
And the align attribute is used to correct the position of the paragraph
EXAMPLE:
<html> <head> <title> </title> </head> <body> <p align="left"> Left Alignment - Paragraph </p> <p align="center"> Center Alignment - Paragraph </p> <p align="right"> Right Alignment - Paragraph</p> <p align="justify"> Justify Alignment</p> </body> </html>
|
|
<p align="left"> Left Alignment - Paragraph </p>
- The paragraph will start from the left side of the web page (It is default).
<p align="center"> Center Alignment - Paragraph </p>
- The paragraph will start from the middle of the web page.
<p align="right"> Right Alignment - Paragraph</p>
- The paragraph will start from the right side of the web page.
<p align="justify"> Justify Alignment</p>
- If the paragraph is too large then there will be equal space on both sides of the web page.
- Break tag or <br>
Using this tag we can break a line or create a new line without leaving any space between the lines.
EXAMPLE:
<html> <head> <title> </title> </head> <body> The sea, connected as the world ocean or simply the ocean, <br> is the body of salty water that covers over 70 percent of the Earth's. </body> </html> |
- Pre tag or <pre>
The article will appear on the webpage in the exact format we wrote in Notepad.
For example, if you want to create a format with extra space or line gap or paragraph in the middle of a text, using this tag can be done.
EXAMPLE:
0 Komentar