Students Empire

Learn Something New
Home

HTML Structure



The Structure of an HTML program


Every HTML program has a rigid structure. The entire web page is enclosed within <html> </html> tags. Within these tags two distinct sections are created using the <head> </head> tags and the <body> </body> tags. These sections are described below.


Document Head


Information placed in this section is essential to the inner workings of the document and has nothing to do with the content of the document. With the exception of information contained within the <title> </title> tags, all information placed within the <head> </head> tags is not displayed in the browser. The HTML tags used to indicate the start and end of the head section are:

<head> <title> .... </title> </head>



Document Body


The tags used to indicate the start and end of the main body of textual information are:


<body> .... </body>


Page defaults like background color, text color, font size, font weight and so on can be specified as attributes of the <body> tag. The attributes that the <body> tag.


Note: Specifying a Relative File Path: Wherever a file name needs to be specified, the specified file must be present in the current working directory. If the file is not in the current working directory, the specified file must include the file path. This is because, by default, the browser searches for the file only within the current directory.




>