WebDevelopersNotes logo

home-icon Home / HTML / Basic HTML tutorial- basic tags

Basic HTML tutorial- basic tags

Basic HTML tutorial- basic tags

Here is your first script again:

<HTML>
<HEAD>
<TITLE>My first HTML page</TITLE>
</HEAD>
<BODY>
This is my first HTML page.
</BODY>
</HTML>

And here is how it is displayed in Internet Explorer

Display of first.html in Internet Explorer - A screen shot

Let’s analyze this script along with its display.

  • The script begins with a <HTML> and ends with </HTML>. These are the starting and the ending tags of the HTML document. Each HTML file has <HTML> as the first tag and </HTML> as the last. These tags are not required but it is always good practice to include them in your document.
  • The HTML file has a HEAD and a BODY section. The <HEAD> and </HEAD> tags encompass the head part while the <BODY> and </BODY> surround the BODY.
  • You will find an additional starting and ending pair of tags, the <TITLE> and </TITLE> inside the HEAD section, with “My first HTML page” between them. So what is the purpose of this? Look at the display of the document and you shall find that this text is shown on the top, at the Title bar of the browser. Thus, any text between the <TITLE> tags will be displayed here.
  • The <BODY> tags contain the meat of the HTML page. In our case, we have the text “This is my first HTML page.”. You will notice that this is displayed inside the browser window.

Conclusions:

  • Each HTML document begins with a <HTML> and ends with </HTML> tags.
  • Each document consists of a HEAD section surrounded by <HEAD> and </HEAD> tags and a BODY section with <BODY> and </BODY>.
  • HTML tags come in pairs (usually) with the ending tag containing an additional “/“.
  • Some Tags can surround other tags. This is called Nesting. In our case, the <TITLE> tags are nested in the <HEAD>-</HEAD>tags.
  • Text inside <TITLE> tags is displayed on the browser Title Bar.
  • The text between the <BODY> tags is displayed inside the browser window.

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

In 2000, Joseph N. Grasso had applied for the "iPod" trademark which he planned to use for Internet Kiosks. However, in 2003, he assigned it to Apple. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy