Jump to content

Xhtml Tag <head>


BashChelik

Recommended Posts

Hello fellow web designers!!!I have a doubt in my mind.I am not at peace with <head> tag. Look at following code:

<html>         <head>Some text here         </head>         <body></body></html>

Now, everybody is saying how visible part of the web page is body.I was little experimenting and discovered that if i type some text between <head> tags, it will display it on the top part of page.So is this correct or not?

Best of luck,Mirko

Link to comment
Share on other sites

<head> is where information that the browser uses is located. You can type text in it and the browser will ignore it and just display it.
Now and days browsers may still follow tags in the <head> section such as h1,h2 etc(FF at least). Maybe just an optimization feature
Link to comment
Share on other sites

You are not supposed to put text meant for on-page display inside the head element. Most browsers will, however, assume that is what you mean if you mistakenly include some text or body elements in there. Your code will be invalid, however.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...