Basic HTML Structure

This page shows the basic structure of HTML design. The html page is divided into two sections head and body. Head section contains all the detail regarding the page. Body section contains the content of the page.

The code is shown below.

<!DOCTYPE html>
<html>
  <head>
    <title>Basic Structure</title>
  </head>
  <body>
    <h1>MyCodePartner</h1>
    <h2>Web Development</h2>
    <p>Hi,we are making websites</p>
  </body>
</html>

The output of the above program is

output of the program. basic html structure
output of the program. basic html structure

Just like any other programming language, HTML also supports commenting. The comments are marked as shown below

<!--
Starting of comments
comment continues here.
-->

You should comment the sections so that you can have a better idea when you return back to your code.

2 Replies to “Basic HTML Structure”

Leave a Reply

Your email address will not be published. Required fields are marked *