Latest posts

10/recent/ticker-posts

Structure of HTML Documents

Basic Structure of an HTML Document

Last time we have seen, The Basics Of HTML Programming. Today we are going to learn about the Structure of an HTML Document. So hurry up and get connected...



Structure of HTML Document



All Documents of HTML always start with a document type declaration as the <!DOCTYPE html>. The HTML document itself begins with <html> tag and ends with </html> tag. An HTML document is divided into two parts the head and the body. The <head> element is used to specify information about the HTML Webpage as the title of the Webpage. The main content of the whole webpage is specified inside the <body> element. 


Head Section


  • The information in the head element i.e. <head> tag of an HTML document is very important because it is used to define or augment the data of the document. 
  • In many cases, the information included within the head element is information about the page that is useful for visual designing, defining interactivity, setting the page title, and providing other useful data that defines or controls the document.

Body Section


  • After the head part, the body of an HTML document is defined by <body> and </body> tags. 
  • Only one body element should be included in one document. Within the body of a Web document, there is a variety of types of HTML Markup Elements
  • For example, the basic markup elements define the systematic content blocks such as the paragraph tag (<p>) or the heading tags (<h1> to <h6>). 



Steps to Create an HTML Document



Step 1: Open Text Editor(Notepad).
Step 2: Write the following HTML code to display a sample message.

<!DOCTYPE html>
<html>
    <head>
        <title> Page Title </title>
    </head>
    <body>
        Webpage Designing using HTML
    </body>
</html>

Step 3: Save the above program with any file name, such as "Demo.html" under a Folder name "HTML" in "D:" Drive. 
Step 4: Run this program using Web Browser with the path specified as follows: "D:/HTML/Demo.html".
Step 5: Now Cheer up for yourself, because you successfully created your first HTML Document.

Output : 





So, let's wrap up this session. See you guys Next Time, stay tuned for further updates on HTML Programming Languages...!!!

I hope, our website will definitely help you to improve your Programming Skills and Knowledge.

Thanks for Visiting...!!!




Also Visit


Post a Comment

0 Comments