Thursday, 21 February 2013

Page Titles (HTML BY GOPAL KRISHNA)

All HTML pages should have a page title. 

To add a title to your page, change your code so that it looks like this:



<html><head>


<title>Krishna says Welcome</title>


</head><body>This is my first web page</body></html>


We have added two new elements here, that start with the head tag and the title tag (and see how both of these close).

The head element which starts with the <head> opening tag and ends with the </head> tag appears before the body element which starting with <body> and ending with </body> and contains information that will load before the body information. 

If you look at this document in the browser (save and refresh as before) .
 you will see that '
Krishna says Welcome' will appear on the title bar of the window (not the actual canvas area). 
The text that you put in between the title tags has become the title of the document (surprise!). 


TRY IT .....
 (HTML BY GOPAL KRISHNA)

No comments:

Post a Comment