HTML: A Guide to Hard-Coding

 
   

Starting your first page

The Body

Paragraphs

Headings

Images

Fonts

More Fonts

Line Breaks

Links

Colors

Backgrounds

Horizontal Lines

Mailto

Basic Tables

Advanced Tables

Putting your page Online

Frames

Forms

The Head

JavaScript Drop-Down Menu

Cascading Style Sheets

Basic HTML tags

HTML Home

 

 

Dreamweaver Tutorial

Adobe Acrobat

Faculty Resource Center

 

Susan's Homepage

 

 

The <Head> Element

The <head> is one of the basic tags that forms the "shell" of your HTML document. An HTML document won't function without <head> and </head>. The most common element that appears within the <head> tags is <title>Title of your page</title>.

However, there are some other important elements that should be placed within the head. These elements deal mainly with searching, JavaScript and declaring styles (Cascading style sheets).

Remember, nothing that is placed in the <head> element will be seen on your page.

Searching

Search engines search for web pages and sites in different ways, but one way to assist your site being found is to use META tags. Meta tags are "invisible" elements, meaning they are not seen on your page. There are a few different kinds of meta tags. Look at the code:

All Meta tags have the same format:

<meta name="name" content="whatever the content is">

Lets look at the different meta tags:

  • <meta name="description" content="description of your page">

The search engine that finds your site is going to look for a description of your site and display that description in the search results.

  • <meta name="keywords" content="as many keywords that describe your site that you can possibly type, separated by commas.">

The search engine is looking for sites that contain the keyword the user searched for. To guarantee as many hits as possible, type in all the appropriate keywords.

  • <meta name="author" content="Your name">

This tag basically identifies who made the page, and it is not necessary for searching.

  • <meta name="generator" content="Claris Home Page 3.0">

Some editors will automatically insert a "generator" meta tag to identify what program was used to make the page. Dreamweaver does not do this, but as you can see, Claris Home Page does, and many graphics programs such as ImageReady and Fireworks do do it. You can delete it if you wish.

There are others that can be used. Look at the code for a Nasdaq page:

You can see here that there are more categories for meta names. They are not necessary, but many of them work with different software programs to limit access to children, reload automatically, etc.

One more very interesting meta tag is:

<META HTTP-EQUIV="refresh" CONTENT="x; URL=http://nowhere.com">

This tag will automatically take the viewer to a page you specify in the URL address after a few seconds. You can specify how long it wait by replacing the "x" above with a number. If you put in 0, the page will be loaded immediately; 10 means the browser will wait 10 seconds before loading the new page.

JavaScript

The other main use of the head tag is to write in JavaScript Code. JavaScript is beyond the scope of this tutorial, but if you click on the forward arrow, you will see some JavaScript code that is easy to use on your own page.

Go on to the next page.