Check Lesson 3 – html Basic Tags from Learn HTML section on e akhabaar
In this chapter, we will learn all html basic tags that are the backbone of html language along with html interview questions and practice exercise.
-
Heading Tag :
Any document is incomplete without proper headings. In a html webpage, heading tags are represented by
,
,
,
,
and
. Where h1 is the most bigger in size and h6 is smallest. Example is explained below:
,
,
and
. Where h1 is the most bigger in size and h6 is smallest. Example is explained below:
and . Where h1 is the most bigger in size and h6 is smallest. Example is explained below:
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
The result will be displayed as follows
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is heading 6
-
Paragraph Tag:
Paragraph tags are used to add paragraphs in a document. Where, opening tag is written like and closing tag is written like
. Example of paragraph tag is explained below:
First Paragraph
Second Paragraph
Third Paragraph
The result will be displayed as
First Paragraph
Second Paragraph
Third Paragraph
-
Line Break Tag:
We use line break tag to start a new line in a html webpage. Unlike other html tags, they doesn’t require a closing tag and is written like
. The line break tag has a space after br followed by forward slash (/). Example of line break tag is explained below:
Hi,
How are you.
Regards
XYZ
The result will be displayed as
Hi,
How are you.
Regards
XYZ
-
Center Alignment Tag:
We use center alignment tags to center align any tex in html web page. Opening tag is written like
Text not in Center
The result will be displayed as:
Text not in Center
-
Link Tag:
We use link tags to add a link of an other webpage. Opening and closing tags are represented like and . Example of link tag is explained below:
This is a link
The result will be displayed as:
Chapter Summary:
- Use
,
tags to add heading to a page.…..
- Use
- Use
tag to start a new line. - Use
tag to centre alignment any text. - Use tag to insert a linkl.
Interview question:
- Do we have to type all tags in lower case only?
It doesn’t make any difference weather you type tags in upper case or lower case. But however, some of the browsers doesn’t support upper case tags. So an ideal practice should be to write them in lower case only.
Practice Exercise:
Hello, Learn free html at www.freetutorialpoint.com
In above html code:
- Add a heading ‘HTML Tutorial’ to the above html page.
- Break text at ‘Hello’.
- Center align all paragraph text.
- Add a link to text www.freetutorialpoint.com.
Post your comments about Lesson 3 – html Basic Tags below.