Introduction

In this chapter, various component of HTML are discussed to design a web page.
The basic structure for an HTML page is shown below.

  • Entries inside the < . . . > are known as tags. Most of the tags has an opening and closing e.g. <head> (opening head) and </head> (closing head). Some of the tags do not have closing tags e.g. <!DOCTYPE . . .> and <br>. We need to write the HTML codes inside the tags.
  • The comments are written between ‘<!–’ and ‘–>’.
  • Here Line 1 gives the details of the ‘HTML version’ to the web-browser. The ‘html’ tells it is version 5.
  • The ‘head’ tag (Lines 3-5) contains the header related tags e.g. ‘title for the page’ and ‘links for the css files’ etc.
  • The ‘body’ tag (7-11) contains the actual HTML code which is displayed on the web-browser. Also, we add all the JavaScript related codes just before the closing body tag (</body>).
			1 <!DOCTYPE html> <!-- tells browser above the html version --> 
2 <html><!-- beginning of the html document -->
3 <head>
4 <!-- header related tags e.g. title, links etc. -->
5 </head>
6
7 <body>
8 <!-- actual html document here -->
9
10 <!-- add JavaScript files here -->
11 </body>
12 </html>

© Copyright 2025 | FolkLight Studios