HTML [Hyper Text Markup Language]

CORRECT USE OF HTML TAGS

Learn HTML
We have "beginning" or "opening" tags (such as <HTML>) and we have "ending" or "closing" tags (such as </HTML>). Many elements consist of an opening tag and a closing tag. An element that has an opening and closing tag is referred to as a container element because anything contained between these tags are affected by the element.

Closing Tags cannot be placed just anywhere. u have to close the last tag which u have used in your html code and then only u have to close the other tag which is before than that. Another way of stating this is that the last tag activated must be the first tag in terminating. An example of a correct sequence of tags is:

correct way of closing tags : <tag1><tag2> statements </tag2></tag1>

In this example, <tag1> is activated first, and then <tag2>. Thus <tag2> must be terminated first with </tag2> followed by the termination of <tag1> (</tag1>). In other words, tags are closed in reverse order to the way they are opened. Thus the first tag opened must be the last tag closed. An example of an incorrect placement of tags is:

wrong way of closing tags : <tag1><tag2> statements </tag1></tag2>

In this example, the last tag opened (<tag2>) is not the first tag closed. That is, these tags overlap. </tag2> must come before </tag1>. Container tags cannot overlap each other. If you do not place tags properly, your web page simply won't work. The following is another example of a correct use of tags:

<tagA><tagC><tagB><tagD> statements </tagD></tagB></tagC></tagA>

Note: If you made a mistake typing in the coding for the web page, switch back to NotePad and make the correction. Once the correction is made dont forget to save the document. And switch back to your browser and click on the Reload or Refresh button to reload the current page or simply press F5.

HTML Backgrounds

To keep things a little cleaner I am only going to write what is in the <body> tags. I will omit the <html>, <head> & <title> tags. Needless to say, keep these in your document.

<html>
<head>
<title>My First Learning Webpage</title>
</head>
<body>
Now i undestand what is HTML and how to create a simple html page with title and put some information in the body tag.
</body>
</html>

Changing background colors

<body bgcolor="#66CCFF">
Now i undestand what is HTML and how to create a simple html page with title and put some information in the body tag. And how to change the background color to my webpage.
</body>

The bgcolor attribute specifies a background-color for an HTML page. The value of this attribute can be a hexadecimal number, an RGB value, or a color name.