Tuesday, January 31, 2012

HTML tags to use in body part - Set 1

This is the second stage of our journey of learning HTML. We'll learn the tags which can be used in [body] section of our HTML webpage. There are many tags to be used in body part, but we'll see just basic ones for our ease. So lets start without more blahs.

Related:
Start Learning HTML from scratch

List of basic tags Set - 1 ( Used in Body part )

<a></a>: To add hyperlink to your webpage.
<b><b>: To bold your text written in between start and end of the tag.
<strong></strong>: Style is same as bold, but this is better. You'll come to know, why so? Tuned with us!
<i></i>: To give italic style to the text.
<u></u>: Underline the text.




In detail:
Hyperlink tag :
This is the very useful tag as we often need to insert links into our webpages. Basic answer for the question "Where it can be use?" is to give chance or mechanism to the visitor/user to navigate from one page to another. Without linking between our webpages, we wont get better response/reputation.

You can use it like this way:

<body>
<a href="Link to your another page eg. http://www.google.com">Text To Display</a>
</body>

You will get out put on your page something like this:

Text To Display (When you click on the link it'll redirect you to the Google's homepage.)

Bold Text tag:
Keep in mind these all listed tags are pair tags so you need to close them at the end of use. OK so as you have used MS Word, I don't need to give you introduction to bold. You can show your important texts, lines in the bold style to get better attention of the reader.
Use:
<body>
<a href="Link to your another page e.g. http://www.google.com">Text To Display</a>
<b>This one is for BOLD tag</b>
</body>

Output:
Text To Display This one is for BOLD tag.

Tip: Now if you want output of each tag in new line, you have to use break line tag <br>. This is single tag. So we don't need to close it. Just <br> is enough.

Use with <br> tag:
<body>
<a href="Link to your another page e.g. http://www.google.com">Text To Display</a>
<br><b>This one is for BOLD tag</b>
</body>

This will give you out put something like this:
Text To Display
This one is for BOLD tag.

Italic and underline tags are same as the bold tag. So we are leaving those tags for your practice. And just show you the output.

Final output using all the tags from set 1 Output:

Text To Display
This one is for BOLD tag
Styled with italic tag
Underlined text


Comments and queries are appreciated. They will show your interest in learning.

0 Responses:

Post a Comment