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

The Cars.com domain name and the accompanying site were owned by Classified Ventures, LLC, which itself was a joint venture of several companies. In 2014, Gannett Company, Inc., one of the firms from this group, bought the remaining stake for USD 1.8 billion. After the acquisition, the Cars.com domain was valued at $827 million and the entire company at $2.5 billion. [more...]

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