Tags that go inside the Head
The head section of the code holds all the of the stuff that you don’t see in a web page. This is the code that tells search engines the title of your page (<title></title>), what your page is about and what specific words you want people to search for your page with, what languages your page is in (<meta></meta>). It can also tell your page how to perform applications such as processing forms, telling the date (<script></script>) and using CSS – cascading style sheets – to tell the page how you want it look (<style></style>).
Click on the different parts of this to learn how each element works.
Title = <title></title>
Write the title of your page in between the title tags. Like this:
<title>My First Site</title>
The browser looks at the title and writes the title of your page at the very top of the browser.

So now the code should look like this:
<html>
<head>
<title>My First Site</title>
</head>
<body></body>
</html>
up
META TAGS
Meta tags are special tags that speak to search engines (Yahoo/ Ask Jeeves / Google). There are many different types of meta tag. Here are the two most important that you should include into your page:
<META NAME="keywords" CONTENT="">
This type of meta tag tells the search engine which exact keywords describe what your web page is about. You should aim to have about 25 keywords that you think users will search for. You should never use words as keywords that AREN’T what your page is about.
This is the keyword meta tag for New Image College page:
<meta name="keywords" content="Media, entertainment, college, courses, school, education, degree programs, training, jobs, careers, design school, web design, animation, post production, graphic production, web production, producing, directing, editing, Flash, Photoshop, Corel Draw, Illustrator, HTML, computer graphics, Adobe training, computer animation, modeling, interactive design, producer, director, creative arts, media arts ">
<meta name="description" CONTENT="">
The description meta tag is the text description that search engines show with the link to your web page.
Example of New Image college description meta tag:
<meta name="description" content="Our Toronto Graphic Design School offers training in graphic design, graphic design courses online, graphic design degree, desktop publishing courses, prepress training, digital design, and web design. Department of Corporate Training providing the top subject matter experts for graphic design and web design corporate training services. Computer school for kids featuring game creation courses, 2D and 3D animation courses, web-design and graphic-design courses. Our summer program is sure to have a course suitable for your child. All weeklong, day and overnight summer computer camps will help your child to learn the power of technology">
Other types of Meta Tag:
<meta http-equiv="refresh" content="30; URL=http://www.newimagecollege.ca/">
This tells the browser to refresh the content after 30 seconds. You can also use this to send a user to another web page or website after any set time.
<META NAME="author" CONTENT= "Your Name">
This tells search engines who wrote the document.
<META NAME="copyright" CONTENT="Copyright © 2008">
This tells search engines the page is copyrighted.
<META NAME="expires" CONTENT="26 April 2008">
This automatically expires the document in the search engine's database. Useful for pages that have a limited life, like a news article.
<META NAME="DISTRIBUTION" CONTENT="global">
The page will be published globally – all round the world to every type of media and search engine.
<META NAME="REVISIT-AFTER" CONTENT="15 days">
Have the Search Engine revisit the site to possibly re-submit it. This is important if your site’s content changes a lot, like an online magazine.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
This tells search engines and the browser what language the page is written in.
up
Script Tags
This set of tags is called a JavaScript Block. What the tags do is to tell the browser that a set of insturctions must be loaded into the the browser BEFORE the page contents, because someting in the contents/body will need the instructions to be able to work.
ex. If the web page has a DATE function:
// -- days = new Array(7) days[1] = "Sunday"; days[2] = "Monday"; days[3] = "Tuesday"; days[4] = "Wednesday"; days[5] = "Thursday"; days[6] = "Friday"; days[7] = "Saturday"; months = new Array(12) months[1] = "January"; months[2] = "February"; months[3] = "March"; months[4] = "April"; months[5] = "May"; months[6] = "June"; months[7] = "July"; months[8] = "August"; months[9] = "September"; months[10] = "October"; months[11] = "November"; months[12] = "December"; today = new Date(); day = days[today.getDay() + 1] month = months[today.getMonth() + 1] date = today.getDate() year=today.getYear(); if (year < 2000) year = year + 1900; document.write (" "+ day +", " + month + " " + date + ", " + year + "") // -- Thursday, April 24, 2008
These instructions that tell the web browser to get the date from the main server.
<script="JavaScript">
<!--
JavaScript code goes here
//-->
</script>
The first line <script="JavaScript"> tells the browser to expect and load a set of JavaScript instructions.
<!-- and //--> tell olderversions of browsers to ignore the Javascript block and NOT to print the code as part of the body text.
The last line </script> tells the browser that the set of instructions have finished.
It can be easier to put the JavaScript instructions in a seperate file and link to it. This is especially useful if you reuse the same script/instructions on several pages. That way if you need to change the script/instructions you only have to edit the ONE file and not every page you have put the script into.
<script language="JavaScript" src="file.js"></script>
This line both tells the browser that it both needs to load a block of JavaScript instructions, but also src="file.js" give the browser the relative address of the file - where to look and find the file.
Style set of tags informs the browser to expect and load CSS - Cascading Style Sheet information.
<style type="text/css">
<!--
Cascading Style definitions go here
-->
</style>
The first line <style type="text/css"> informs the browser that the script block is CSS.
<!-- and //--> tell olderversions of browsers to ignore the CSS block and NOT to print the code as part of the body text.
The last line </style> tells the browser that the set of definitions have finished.
Again, it can be easier to put the CSS definitions into a seperate file and link to it. This is especially useful if you reuse the same definitions throught the site. That way if you need to change the definitions you only have to edit the ONE file and not every page you have put the script into.
<link rel="StyleSheet" href="" type="text/css">
This line both tells the browser that it both needs to load a block of CSS definitions, and also href="" give the browser the relative address of the file - where to look and find the file.
up |