HTML5 Tutorial | Head and body tags

Head and body tags

A web page is contained between the opening <html> and closing </html> tags.

<html> element

This element contains the whole HTML document. HTML document should have one opening <html> tag and document should end with a closing </html> tag. It has <head> and <body> tags in it.

<head> element

It is the head of the page, having information about the page but not the content of the page as it contain a title and a description of the page, or location for CSS and JavaScript files. The element has an opening <head> tag, the closing </head> tag, and everything in between.

<body> element

It is the body of the web page and has all the content seen on the web page. It consists of the opening <body> tag, closing </body> tag, and everything in between. Usually it appears after <head> element and the contents in it are also called as body content. It can have some paragraphs or complicated layouts having forms and tables for example


<p>This is a paragraph tag.</p>



An element containing other elements, must wholly contain that element. This is called as nesting elements correctly.

Test Your HTML5 Skills By Taking Our Practice Tests On This Link

Apply for HTML5 Certification Now!!

Go to- Certified HTML5 Developer Tutorial

Get industry recognized certification – Contact us