Main Page. VBA, ASP, Visual Basic 6.0, and VB.net. Visual C++, C#, C++, C. HTML and maybe javascript. Forum,Games and Jokes, other stuff. Submit a Tutorial Today!

Scripting and Misc. Tags


Welcome to Lesson 5 in the HTML tutorial. You should already know how to do most of the body tags, including text alteration, body tag alteration, links, images, and all that other stuff.

Meta Tags

Do you wonder how a search engine indexes pages? Do you wonder how to put lots of stupid information in a web page? Well, your days of wonder are over, because of Meta tags. Meta tags are easy to make, if you know the possible values. Here is an example.

<HEAD>

<META name="ROBOTS" value="ALL">

</HEAD>

<!--Note that META tags have no closing tags and are always in the HEADER portion of the page.-->

One or two important things to remember about Meta tags are that first; they have to be in the Header of a web page. Secondly, they never have a closing tag.

In the tag above, I am sending the server the information that if a Robot, search engine index thingy accesses the page, allow it to index it and follow any links in the page.

To make Meta tags do what you want, you have to have a listing of the names and values. Well, here I come to save your little ass again, cause I have a listing of them. But before we get to that list, I have to show you a special Meta tag combo that is pretty cool.

If you ever want to refresh or automatically change pages after a few seconds, you can use this Meta tag to do so.

<META http-equiv="refresh" value="30; index2.html">

This Meta tag makes the web page refresh in thirty seconds to a page called index2.html. If you wanted the current web page to refresh itself every 30 seconds, you could use just get rid of the name of the document and the semi-colon in the VALUE attribute.

Here are some other values for the Meta Tag

  • Name="author" value="your name"
  • Name="keywords" value="keywords separated by commas"
  • Name="title" value="the title of the site"
  • Name="Robots" value="ALL, Follow, Index, or NONE"
  • http-equiv="charset" content="iso-8859-1"

Tip: If I want to add a large number of Meta tags, I usually just use a Meta tag generator and make about 15 at a time for a document.

Adding JavaScript and Java to your pages: the <SCRIPT> and <APPLET> tags.

The Script and Applet tags are one of the more common tags on pages that use a lot of Java-related coding.

The Script tag is used to add JavaScript or Scripting to your page. The Script tag has the following attributes.

<SCRIPT>

  • Language: This could be either JavaScript, if you are adding JavaScript code, or VBScript, if you are adding Visual Basic Scripting Code.
  • Src (Optional): This is the name of the source file that the scripting is from.

Example:

<SCRIPT language="Javascript" Src="bananaboat.js"></SCRIPT>

Tip: If you want use one Script tag to link a JavaScript file to your page, you have to make the tag have nothing in between it.

The Applet tag is used to reference an external Java Applet in your page.

<APPLET>

  • Alt: Displays text for non-applet compatible browsers.
  • Code: Where you specify the filename (not the path) of the file.
  • Codebase: Where you specify the path (not the filename) of the file.

Example: <APPLET alt="Banana and Apple Dancing of a Plate!" Code="banana.class" Codebase="http://somewhere/"> </Applet>

This should finish you up on the Novice HTML tutorials unless I forgot something. From this, you will be able to make a good deal of pages. Also, look for the Tables Tutorial, the Frames Tutorial, and the Forms Tutorial, Coming soon!

-Anman


<-Previous Lesson Next Lesson ->
 

Binary Central by Anman: "http://www15.brinkster.com/anman/"