MEANING AND USE OF HTML & HEAD TAGS

 

THE <HTML> TAG 


The <html> Tag

The first page structure tag in every HTML page is the <html> tag. It indicates that the content of this file is in the HTML language. The <html> tag should immediately follow the DOCTYPE identifier (as mentioned in the previous note), as shown in the following example.

All the text and HTML elements in your web page should be placed within the beginning and ending HTML tags, like this:


<!DOCTYPE html>

<html>

...your page...

</html>

The <html> tag serves as a container for all of the tags that make up the page. It is required because both XML and SGML specify that every document have a root ele ment. Were you to leave it out, which you shouldn't do because it would make your page invalid, the browser would make up an <html> tag for you so that the page would make sense to its HTML processor.


The <head> Tag


The <head> tag is a container for the tags that contain information about the page, rather than information that will be displayed on the page. Generally, only a few tags are used in the chead> portion of the page (most notably, the page title, described later). You should never put any of the text of your page into the header (between <head> tags).

Here's a typical example of how you properly use the <head> tag. (You'll learn about <title> later.)


<!DOCTYPE html>

<html>

 <head>

<title>This is the Title. It will be explained later on</title>

</head>

your page...

 </html>

                                      

Stay connected To be continued...

Post a Comment

Previous Post Next Post