Things you want to know about websites


Html Document Example

Html Comments

Comments are included to help comprehend and understand the code. They can be included by yourself to understand the code when you look at it some time later or they can be included by a developer distributing his/her code to other people so that they can understand what the code is doing.

Comments have the following form in Html,

<!-- Type your comment here -->

Comments are not read by the browsers and they do nothing to effect execution of the code.

Simple Html Document

We have talked about the basic things that make up an html document like tags, elements, attributes etc. Now lets use this stuff to make an actual document.

The <Html> tag

Start the document with an <html> tag.



The Head section

The head section is elcosed by <head> and </head> opening and closing tags.

There are various elements that can be included in the <head> element but for now just type a title.

The title describes the contents of a web page and appears on the top area (title bar) of the browser. You can type a title by using <title> tag.


<title>My web page</title>

Now closed the head section by </head> tag.

The body section

The body section starts with a <body> tag and ends with a </body> tag.

The body section actually includes the content of the page. You will learn how to compile your content in the later sections of this website.

For now just type a heading and a paragraph of text. You can do this by using <h3> and <p> elements.

Close the body section with a </body> tag.

The ending </html> tag

After you are done creating the document, end the docuemt with an </html> tag.


Lets put together what we have created till now from our discussion above,


<title> My web Page </title>


<h3>My First Document</h3>
<p> This is my First Html paragraph.</p>
<!--All the content of the body section will be here.-->



Bookmark or Add to Favourites

Next :



Html Document Structure

Link to this page :

Copy and paste the following code in an html document to link to this page,