Earlier, we had studied about the html language (intro part), Now we are going to learn about the different html tags available in html.
- <head> tag
The head tag is used to define the document header. The head tag contains the information about the document including titles, scripts, other html tags. Head tag is also called container tag. It contains title tag. To add head tag we enter it between the html tags and head tag is used inside html tags.
1. <head> tag is placed between <html> tag and <body> tag.
2 . It is a first element inside an html element.
3. It starts with the after starting html tag and ends before the starting body tag.
4. In the head tag we can use title, links, styles, script tag.
<title>My First Web Page </title>
<h1>My First Heading </h1>
<p>My First Paragraph</p>
- <TITLE> TAG
The title elements(tag) contains the title of the document and it help us in identifies the content in a global context.the title is displayed at the top of the browser where we run the document which was written in notepad. A title is also used to identify your page for search engines.
Note: The title should be able to convey the purpose of your web page . generally we should the keep the title atleast 64 characters or fewer.
List of HTML Tags
- BODY TAG
The second and largest part of any html document is the body this tag contain the content of any document (displayed within the text area of the browser window).the body tags defines the document’s body.it contain all the contents like images,text,list,tables,htperlink etc.
Now , we gonna see some attributes of the body tag are :
bgcolor: this attribute is used to give background color of the page.
- HTML heading tag <h1> to <h6>
- Heading tag defines from <h1> tag to <h6> tag.
- <h1> tag is most important heading.
- <h6> tag is least important heading.
- Heading tag starts with <h1> tag and ends with </h1> tag.
- it defines within <body> tag
<h1>My first heading</h1>
<h2>My second heading</h2>
<h3>My third heading</h3>
<h4>My fourth heading</h4>
<h5>My fifth heading</h5>
<h6>My sixth heading</h5>
- HTML Paragraph Tag <p>
1. It used to write the paragraph in web page.
2. It uses within body tag.
3. It starts with the starting tag <p> and ending with</p>
<h1> My First Heading</h1>
<p> My First paragraph</p>
More html tags examples available at Mozila html elements page.