Home / code / html

What the hell is <HEAD> and <BODY>

Well everything between <HEAD> and </HEAD> you don't see.
And everything between <BODY> and </BODY> you do see.

What can you do in the head section ?

Now the <HEAD> section is used mainly for searchengines.


Everything between : <TITLE> and </TITLE> is your page title.
You can put anything you want in this tag, but there are some guide lines.
First the name of your page (what's on this page ),
then the title of your site,
and you can add your companies name.
In the title you can add up to 60 characters, you can add more but then search-engines might decide not to index you..

Return to HEAD

<STYLE type=” ”></STYLE>

Well this tag helps with the layout of your page. fonts, bold, color,borders, ...
It is only used from HTML4 so most browsers don't support it, yet.
For more info go here.

Return to HEAD

<META name=”description” content=” ”>

Her you can a discription of your page.
The searchengines will use this to add it as a discription when they list your site.
It best you add some keywords in it but don't overdo it. No more then 150 characters.

Return to HEAD

<META name=”keywords” content=” ”>

This is one of the most importand tags if you want your site to get listed on searchengines.
You can put all the words and ”phrases” that has anything to do with your page.
Many webmasters add in this tag the most popular words to get more hits on there site.
All words must be separated with a comma , and the total length can not be longer then 874 characters.

Return to HEAD

<META NAME=”generator” CONTENT=” ”>

Here you can put the name and version of your HTML editor.
Some editors do it automatically.
I never do it, it just takes time and place.

Return to HEAD

<META NAME=”name” CONTENT=” ”>

In this tag your can put you name, because you are the creator of this page and you deserve all the credit.

Return to HEAD

<META NAME=”copyright” CONTENT=” ”>
Copyright, no need to explain.

Return to HEAD

<META NAME=”robots” CONTENT=” ”>

Here you can tell the robot what to do. Index your page or not, follow the links or not.
If you do not put this tag the searchengine automatically index and follows all the links.

  • <META NAME=”robots” CONTENT=”noindex, nofollow”>
  • <META NAME=”robots” CONTENT=”all, follow”>

Return to HEAD


Here you can tell browsers to not cache the page, and send a new request instead.

  • Public - may be cached in public shared caches
  • Private - may only be cached in private cache
  • no-Cache - may not be cached
  • no-Store - may be cached but not archived
Note: It may be better to specify cache commands in HTTP than in META statements, where they can influence more than the browser, but proxies and other intermediaries that may cache information.

Return to HEAD


If you want to link to pages on another site you'll need this.
You put the URL in this tag and in the body you only need to but the file name.
note: Not all browsers support this already.

Return to HEAD


Now this is more fun, if you put in the tag ”refresh” and ”30” as content, you can refresh your page every 30 seconds.
<META HTTP-EQUIV=”refresh” CONTENT=”30”>
You can let another page load after a person stays on your site for lets say 10 seconds
<META HTTP-EQUIV=”refresh” CONTENT=”30; url=otherpage.html”>
Yes if you but the time to 0 and TARGET=”new” you get pop-ups.
But I HATE pop-ups besides there are better tags for pop-ups.

You can also use it for searchengines:
If your page is only good for a couple of weeks. You can add the expire date.
<META HTTP-EQUIV=”expires” CONTENT=”Tue,31 Dec 1999 23:00:00 GMT”>

If you don't want a computer to cash your page, add the following tag:
<META HTTP-EQUIV=”pragma” CONTENT=”no-cache”>

Return to HEAD

<META HTTP-EQUIV=”Content-Language” CONTENT=” ”>

This is a tag to add your site language on. Searchengines like Altavista use this.
I will add a list her with all languages, soon.

Return to HEAD

<BGSOUND SRC=”thesoundfile.wav” LOOP=”3”>

You can use this if you want to but a background sound on your page. The loop is the times it has to repeat. if you put ”-1” it loops forever.
It can be WAV but also MID, and even MP3.
Now remember the user can not turn it off so don't set it to loud. And remember the bigger the sound file the longer it takes to download your page.

Return to HEAD

<meta name="MSSmartTagsPreventParsing" content="TRUE">

With this tag you prevent Microsoft from putting Smart Tags on your webpage. A must!

Return to HEAD

<meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0)">

This is cool, it slowly reveals your page when it is visited. Try it out.
Doesn't work in all browsers.

Return to HEAD

<meta http-equiv="Page-Exit" content="blendTrans(Duration=1.0)">

When someone exits your page it slowly fades out.
Doesn't work in all browsers.

Return to HEAD

<meta http-equiv="refresh" content="600">

This lets the page automatcly refresh the page every 600 seconds.
You can also be send to another page: <meta http-equiv="refresh" content="10;url=http://www.webmaster2020.com">

Return to HEAD



Latest script: