In the HTML Introduction chapter we saw the following example.
<!DOCTYPE html> <html> <head> <title>Index Page</title> </head> <body> <h1>Hello World!</h2> </body> </html>
Lets understand the code line by line.
The first line
<!DOCTYPE> defines the document type i.e., HTML so the browser gets to know that its a HTML file.
Next comes the
<html> tag. The entire HTML web page code is enclosed within the opening
<html> and closing
Inside the html tag we have the
<head> tag. It is like a header which contains some information like the title of the web page for instance. This is not displayed on the browser.
Inside the head tag we have the
<title> tag which contains the title that we have given to our web page. In this case, Index Page.
Then comes the
<body> tag. The content of the body tag is displayed on the browser.
Inside the body tag we have
<h1> heading tag which says Hello World!.
We will be covering these tags in more detail in the following chapters.