HTML Basic Tags

HTML Basic Elements :

Any of the HTML document should contain the at least following basic tags.

<html> The main container for HTML pages
<head> The container for page header information
<title> The title of the page
<body> The main body of the page
We have already seen these tags in previous chapters, but in this chapter we will be learning each tag in more details -

A. <html> Tag :

  1. It is the most important tag in HTML. Each and everything we write in the HTML document goes inside the HTML Tag.
  2. HTML tag contain basic nested tags called - <head> and <body>
  3. It represents the root of the HTML document.
  4. <html> tells browser that the document you are looking is HTML document.
  5. The <html> tag is the container for all other HTML elements (except for the tag).

B. <head> Tag :

All the head elements can go inside the head tag. Following are the elements that can be written inside the head tag. The following elements can go inside the <head> element:

<title> It it required tag in the head section. It defines the Title of the HTML document.
<style> It is used to define style information for an HTML document.
<base> It Specifies a default URL and a default target for all links on a page
<link> It is used to link external style sheet to an HTML document.
<meta> It is used to describe the meta data information of the HTML document.
<script> It is used to include interactive code to an HTML document. It is used to include JS or jQuery code
<noscript> It is used to show alternate content to the user where JavaScript is disabled.

C. <title> Tag :

<title> tag is used for the defining title of the web page. It is most important tag for Search Engine Optimization perspective.

<head>
<title>Title of Document</title>
</head>