Enigman's HTML FAQ


Enigman's Home Page  | HTML Resources  | Javascript Resources  | Site Map |

G'day and welcome to my HTML FAQ page. This page is almost certainly in a permanent state of flux as I add new questions raised by newbies and experienced HTML authors. I hope that you find something of use and of interest here.

As time goes by I'll put the questions into appropriate categories (eg. Anchors and Links, Images etc). For the moment however, I've just placed the questions in the order that I added them.

1.How do I play a *.WAV or *.MID sound on my page?
2.How do I keep someone from "stealing" my HTML?
3.Do I really need the </TD> and </TR> tags at the end of a table?
4.How do I get rid of the border that surrounds an image when I make it a link?
5.My whole page has become one giant link. It's all blue and underlined. What happened?
6.My hypertext link doesn't work. But the command is correct!
7.How do I get the < and the > to show up on my pages?
8.Is there an HTML tag to put a single space between the words?
9.Do I need to type HTML tags in uppercase (capitals)?
10.Is there any difference between using the hex colour codes and using the word colour codes?
11How do I play a midi or wave file when you click on a picture on my page?
12How can I use super- and sub-script text in my pages?
13How do I insert the copyright (©) symbol into my web page(s)?
14How do I get the ampersand (&) symbol to appear on my pages?
15Do you have a list anywhere of the characters available in HTML?
16If I nest a tag within another (eg. <EM><STRONG>) does it matter which order I close them?
17I created a HTML file, all the tags are correct but the browser displays everything as ordinary text. What's wrong?
18How do I create a link that will send an email message to me?
19How do I create a link to something that is on the same web page?
20How do I insert comments on my page?
21Are the size of the files that I use in my web page important?
22.Should I have lots of links on my page or only a few?
23.My tables appear fine in Internet Explorer but appear strange in Navigator. What could be wrong?
24.Why shouldn't I use Browser specific tags? After all, won't everyone upgrade eventually?
25.Can I stop people from stealing my images?
26.How do I set the page background to a different colour?
27.How do I set the background colour of a table?
28.Some of my images or links don't work properly even though they are on the server. What could be wrong?
29.How do I get my web page on to a server?
30.How do I get a counter, search engine, or guest book to my site?
31.What should I put on my own pages?
32.How do I put a link that will send a mail message to my e-mail address?
33.I have moved my home page. How do I redirect people to my new location?
34.How do I know if other people have linked to my site?

1. How do I play a *.WAV or *.MID sound on my page?

First of all determine what you want to do. Do you want to:

A) create a link that people click on to hear your sound or
B) do you want the sound or music to start playing when the person accesses your page?

Method A - Creating a link to the sound

Create an anchor as normal using the anchor tag with a link to the path of the file.
Example: <A HREF="../sounds/mysound.wav>Listen to This</A>

The link will appear as normal and when the person viewing your Web page clicks on the link 'Listen to This' the sound will be loaded and played by the browser.

Tip: Also include information about the size of the file so that your visitor can decide whether they want to wait for the file to be downloaded to their browser.

Method B - Having a sound play when the person accesses the page

One of the things that people often look for is a browser independent method of being able to play sounds on entry to a page. The following method works on both Netscape Navigator and Internet Explorer.

<EMBED SRC="mymusic.mid" AUTOSTART="true" HIDDEN="true" loop=infinite>

Parameters for the EMBED tag when using a sound file are as follows:
Another way of implementing background sounds on your web page is to use Javascript to detect the browser and then have the script insert the appropriate tag into your page. You can find further information on how to do this on my Javascript samples page.

2. How do I keep someone from "stealing" my HTML?

Don't put it on the Internet. Most browsers allow you to view the HTML code of a web page merely by selecting an option such as View Source. A lot of people ask this question apparently in fear that their page design will be stolen and used by other web authors.

I've learned a lot from looking at other people's HTML code, perhaps a lot more than from reading various HTML books. Perhaps a poorly done page as been the inspiration for a brilliantly executed page (the opposite is probably true). Besides, being an HTML author yourself, would you really want to not be able to check what other authors are doing?

The spirit of the Internet has been to exchange and share information and keeping your 'goodies' to yourself is not in the spirit of cooperation. Like most people, I can understand wanting to protect images that you have created but most HTML is hardly unique. We were all newbies to HTML once (or was it twice? :0) and have learned a lot from one another and looking at other people's code. Okay, that's my rant over.

3. Do I really need the </TD> and </TR> tags at the end of a table? I made a table without them and it worked just fine. Wouldn't leaving them out save time?

You should as some browsers have problems if you don't complete the tags. If you only have one table on a page, there normally shouldn't be any interaction problems. If you use images in your table cells, you can run into problem. If you have more than one table on a page the browser may get confused and display the second table incorrectly. Essentially, where the HTML specification calls for opening and closing tags, you should use them

4. How do I get rid of the border that surrounds an image when I make it a link?

Add the command BORDER="0" for the IMG tag when using the image command.
Example: <A HREF="a_html_file.html"><IMG SRC="mygraphic.gif" BORDER=0 ALT="A picture is here"></A>

5. My whole page is one giant link. It's all blue and underlined.

It looks scary but it's easy to fix. You must have missed a closing </A> tag for one of your links. If it starts at a particular point then you know it's that anchor that is incorrect.

6. My hypertext link doesn't work. But the command is correct!

Check if the address is correct. Check for missing quotes. Check for a missing dot. If the commands are correct it should work. There must be a problem somewhere. This can be the most frustrating part of developing a page. In fact, it happened to me even as I was doing this very paragraph. (I missed a > for the link). We've all faced this problem at one time or another. Just keep looking it over.

7. How do I get the < and the > to show up on my pages?

You need to write the < and > using an & command. This: &lt; represents a <. This: &gt; represents a >. Don't surround the commands with < and >. You can also use the binary formats for these symbols which are; &#60; for < and &#62; for > For a complete list of HTML characters, refer to my HTML character table

8. Is there an HTML tag to put a single space between the words?

Yes. Use &nbsp; It is equal to one space in HTML. For a complete list of HTML characters, refer to my HTML character table

9. Do I need to type HTML tags in uppercase (capitals)?

No, you do not. I type most of my HTML in uppercase to make it easier to spot while editing. If you look at the source of my pages, you will probably notice a lot of white space that I have left to make it easier for me to read later on when I am working on it again. I also like to put comments where I feel it is necessary so that if I am editing something months later I know why or how I set it that way.

10. Is there any difference between using the hex colour codes and using the word colour codes?

Not really unless your audience is using an older browser. However, having said that, I prefer to use the hex colour codes so that the majority of browsers can cope with my pages.

11. How do I play a midi or wave file when you click on a picture on my page?

Just create a link to the midi or wave file from the image file. The example given below displays a picture called mygraphic.gif that is a link to the sound mysound.mid. Instead of using text to describe the link we are using an image to do the same.
Example: <A HREF="mysound.mid"><IMG SRC="mygraphic.gif"></A>

Tip: Also include information about the size of the file so that your visitor can decide whether they want to wait for the file to be downloaded to their browser.

12. How can I use super- and sub-script text in my pages?

Try using the tags. <SUP>my text</SUP> and <SUB>my text</SUB> There are also another two superscript tags, check out my HTML Characters page for details.

13. How do I insert the copyright (©) symbol into my web page(s)?

There are two ways of doing this. You can use &copy; or &#169; I usually use &copy; because it is easier to remember.

14. How do I get the ampersand (&) symbol to appear on my pages?

You can use either &amp; or &#38; to display the ampersand. The ampersand has a special meaning at times in HTML which is why you can sometimes get strange results if you just type it into a page.

15. Do you have a list anywhere of the symbols available in HTML?

Now that you mention it, I do. Check out my HTML Character Table page

16. If I nest a tag within another (eg. <EM><STRONG>) does it matter which order I close them?

When nesting tags within another you should generally close the tags in the reverse order you used them. Not only does this make your HTML easier to read it will also be less likely to confuse the browser your visitor uses.
Example: <EM><STRONG>My Bold, Italic text<STRONG><EM>

17. I created a HTML file, all the tags are correct but the browser displays everything as ordinary text. What's wrong?

Did you save your file with a HTM or HTML extension? It could be you saved it with a TXT extension (especially if you used Windows Notepad) to create your file. If it is saved with a TXT extension your browser will usually attempt to display the entire file as a straight text file.

18. How do I create a link that will send an email message to me?

You create a normal link but you use the mailto protocol instead of http. An example may help.
Example: <A HREF="mailto:myaddress@my_isp.com">Send me Email</A> will (when clicked) send an email message to the user myaddress at the service provider my_isp.com

19. How do I create a link to something that is on the same web page?

This is a very useful tool. It allows you to create a table of contents on the same page that the information appears. As a matter of fact, it is what I used to create most of the links on this page making it easier to navigate.

This requires the use of the anchor tag <A> in a couple of places on your web page. One will be the link to the place on the page where you want the browser to jump to, the other will be the point where you jump to. Sound confusing? It isn't once you've used it a few times. Here's how you do it.

At the point where you want the browser to jump to you insert the tag <A NAME="name_of_jump"> where name_of_jump is the name that you want to use.

To create the link to the jump point you've created you would use <A HREF="#name_of_jump">This is my jump</A>
The # symbol is important when you use it in an anchor tag. It tells the browser to look on the same page as the link for name_of_jump. If you don't include the #, the browser will look for a page named name_of_jump which it will not find.

20. How do I insert comments on my page?

You can insert comments on your page that are ignored by the browser. This allows you to put explanations, reminders or other information on your page for yourself or for someone examining your HTML. I use comments thoughout my pages to remind me of why I did something in a particular way or to remember to insert updated information or even to show the starting point of my links to other pages. Enough already! You want to know how to do comments!

To place something within comments you have to use an opening <!-- and closing tag --> Anything that appears within those two tags (including HTML) will not appear on your page. The <!-- and --> can enclose a single line or many lines (they do not have to appear on the same line). This can make it easy to hide partsof the page you are working on from the viewer (eg. information that becomes relevant at a future date or changes that you are still working on). It can also help when your Web page misbehaves after a change or two (which can happen). By being able to comment the HTML tags you can narrow down where a problem is occuring making it easier for you to fix.

Example: <!-- This won't appear in the browser -->

21. Are the size of the files that I use in my web page important?

Yes, as a matter of fact they do. The size of the graphic (image) elements combined with the text of the page itself make a big difference to the impression you make. If you use a large number of high resolution images on your page it takes longer to load and we all hate waiting. At the time of writing this (September 1997) a typical Internet user would have either a 14.4K or 28.8K modem. If you have a look at the following table you will get an idea of how long it would take for the entire page to be copied to their browser.

Transfer Times (in Seconds) for Various Modem Speeds and Page Sizes

Note: Estimates only based on optimal transfer rate
Page Size 14.4K Modem28.8K Modem56.6K Modem
40K22.211.15.8
80K44.422.211.1
160K88.944.422.2
320K177.888.944.4
640K355.6177.888.9

As you can see the more and larger files that you incorporate within your web page, the longer it takes to download and the more you rely on the patience of your audience.

22. Should I have lots of links on my page or only a few?

A lot depends on what you are trying to achieve for your page. Is it supposed to be a page with many links to other pages? My Cool Links page is designed to be the main page for my external links but the choice is up to you as the author. Remember though, the more links to other sites, the more temptation for your audience to follow those links (unless you can entice them to stay). A link is an invitation to the reader of your page to go to another, possibly more alluring location.

If you have designed your page to be a single source for all things HTML then quite possibly you will have lots of links to many different HTML related sites. On the other hand, if there is a lot of information that you want to provide to the reader, tempting them with a lot of links is probably not a good idea.

23. My tables appear fine in Internet Explorer but appear strange in Navigator. What could be wrong?

This is related to question 3. Make sure you have closed the table related tags properly. Check that for each <TR> you have a matching </TR> also check for each <TD> you have a matching </TD> and make sure you have included a closing </TABLE> tag. The reason why it shows up okay in Explorer, but not okay in Navigator is that Explorer is more forgiving of sloppy HTML code (which makes you wonder about the coding practices at Microsoft). Closing tags that need to be closed just makes good sense as you want to ensure that your page can be viewed properly by the majority of your audience.

24. Why shouldn't I use Browser specific tags? After all, won't everyone upgrade eventually?

Not necessarily. People may be limited by hardware, the connection that they have etc. It may not be possible for them to upgrade to the latest and greatest in browser technology. Having your page rely on features of one particular browser does an injustice to both yourself and your audience. You may immediately alienate the very person you were trying to communicate with. Browser specific tags encourage proprietary standards to become entrenched which make it harder for authors such as yourself to get your message across. What if another browser's proprietary tags became the standard? Your pages would no longer be viewed effectively by the majority of readers and you would have to probably spend a lot of time redeveloping your pages.

Rather than adopt these proprietary tags, support the standards that the W3C have been developing and encouraging. If a proprietary tag is worth adopting, the majority of people will support it's adoption.The popularity of the World Wide Web has been the ability of users of different computer systems to be able to communicate and share information. By adhering to the developing standards you help to maintain these standards and it encourages others to do the same. That's my rant over for now.

25. Can I stop people from stealing my images?

No. The nature of Web essentially prevents you from being able to stop people copying your images. When a person visits your page, the text and images are copied down to their browser. From that point on they can save the image to their own PC. You can, of course, copyright your work which may prevent some commercial organisations from using your work on their site(s) but it is unlikely to prevent the individual from copying and using your work. Personally, I have no objection to you copying this FAQ page I have developed as long as I am given appropriate credit. I realise it is hard to develop material for your pages (I have the same problem) but give credit where it is due.

26. How do I set the page background to a different colour?

You can set the page background by setting the BODY attribute BGCOLOR to the colour that you want. To do this you can use an inbuilt colour name or use the hexadecimal equivalent. I use the hex equivalent as this is compatible with the majority of the browsers used. Below is an example which set the background colour to white.
Example: <BODY BGCOLOR=#FFFFFF>

27. How do I set the background colour of a table?

As with the <BODY> tag you can set an entire table to have a background colour, or a particular row or even particular cells. This can create a variety of effects that are much faster to appear on your page than if you use GIF or JPG files. Some examples may help:

Examples:
<TABLE BGCOLOR=#CC9999> will set the background colour of an entire cell.
<TR BGCOLOR=#FFCC99> will set the background colour of an entire row.
<TD BGCOLOR=#CCCCCC> will set the background colour of a cell.

You may want to set the background colour of a table but set individual cells to have a different background colour. Set the table backgound colour by using the <TABLE> tag and then for the individual cells use the <TD> tag.

28. Some of my images or links don't work properly even though they are on the server.

If the files are present on your server and in the right location(s), perhaps your server is running on a system that is case sensitive. Case sensitive means that the system recognises differences between upper (eg. A) and lower (eg. a) case. This can make a difference to someone who is writing a web page as the system would see Index.html as being different to index.html. At present, many web servers are running on Unix servers which are case sensitive so if you had a link on one of your pages such as <A HREF="MyPage.html"> and the file was saved on your web server as mypage.html your web server may not find the page as it regards MyPage.html to be a different file to mypage.html. Check your page to see whether the file names you refer to are of the same case as the file on the server. If not, try changing the case so that they match and then try viewing your page again.

29. How do I get my web page on to a server?

Good question. First of all, you need to find out whether your service provider will allow you to put your web pages on their server. Some charge a fee for the space you use, some include a certain amount of space in their regular fees and some don't provide it at all unless you are a business. You will need to check with your service provider to see just what they offer.

Okay, now that you know your service provider allows you to have a web page on the server and you know about any charges etc, you now have to get that hard work of yours on to the server. Most service providers will tell you the location of your home page or what you have to do to get it there. More often than not, your home page will be named index.html. You will need an FTP program such as WS_FTP or CuteFTP to copy your files up to the server (you may have to download the program and install it first).

Run your FTP program, provide the details of the server you have to log in to (your ISP should have provided that) and then log in with your user name and password. Now select your HTML (and other) files that you are using for your web page(s) and copy them to the server. By default there should be a directory that only you can access and the FTP programs nowadays are usually good at finding them.

Now that you've copied your files across to the server you have to test them and test them and test them. Leave nothing to chance. Check every link and every page to make sure that it appears how it did on your computer when you were developing it. A common problem that many people face is putting the full path of the files and including such things as the C: drive or the A: drive. This will not work as the servers don't recognise those drive letters when someone is browsing. Links should be relative so that if you move your web page to a new site you do not have to do too many changes.

30. How do I get a counter, search engine, or guest book to my site?

Most search engines, counters and guest books are CGI scripts or programs. CGI stands for Common Gateway Interface and it provides a standard way for web servers to talk to external programs. You need to find out if your service provider will give you CGI access and any additional costs associated with it. Once you have CGI access you can get some of these programs from Matt's Script Archive or Selena Sol's Public Domain CGI Script Archive and Resource Library web sites. You can then use the instructions provided with these scripts to customise the scripts for your site.

31. What should I put on my own pages?

Surprisingly, this is a fairly common question. While some people might put all sorts of personal information on their page, others might just be a little more reticent about revealing too much about themselves. Popular topics are pictures of favourite film star or a special person in their life, pet or even computer. Others would like to publicise information about their favourite hobby or sport or other special interest. Some people put their resumes on their pages just in case someone browsing their page is on the lookout for a new employee. If you do include your resume in your web pages, be very careful about such things as punctuation and spelling. Another thing to consider is what other content you have on your pages. As an example, if you list your favourite sport as alternative drag racing (driving around really fast in women's clothing) then maybe you should reconsider putting your resume on your web site.

Be aware, that as a medium, Web browsing tends to be a short attention span sort of affair so you ony have a short amount of time to attract your audience. Placing a large number of graphics and sound on your home page may make it attractive but if it takes seemingly forever to download then your audience just might disappear never to return

As you might have guessed, I've devoted some of my pages to HTML, Javascript and Web editing while some pages have personal information that gives you more of an idea of the type of person that I am. I've also included information about Australia, where I am from for those that are interested.

32. How do I put a link that will send a mail message to my e-mail address?

This is easily done using the Anchor tag. Instead of using the http protocol you use the mailto protocol. his makes it easy for a visitor to contact youor whoever the target of your link is (eg. Sales Representative, Technical Support person at your organisation). An example from my own pages may help. At the bottom of all of my pages I have included a link that will open a new mail dialogue box when you select it. By using the following syntax, you will be able to include your own e-mail address. Using a normal anchor tag you enter <A HREF="mailto:your_email_address>The name for your link</A>

For my e-mail link I use <A HREF="mailto:enigman@ozemail.com.au>enigman@ozemail.com.au</A> which results in:

Be advised however that many spammers now collect email addresses from people's web pages. A program similar to that used by some search engines will look through each page to find an email address and in many cases, that is how you end up on a spammer's mailing list. If you want to see a couple of ways of evading spammers using this technique please check out my Javascript Samples page.

33. I have moved my home page. How do I redirect people to my new location?

In some cases, your old service provider may allow you to redirect people to the new location for a small fee. Some will even do this for nothing or provide you with a page that does the redirection, all you have to do is adjust the link so that it points to the new location. Personally, I recommend retaining your old service provider for about three months after you have switched to allow time for infrequent visitors to learn that your site has moved.

Okay, you've made the switch, how do you redirect people to the new location? Perhaps you may have noticed that at some sites you get redirected to a new page, you might see a page displayed that will take you to the new page after a few seconds. We are going to use the same technique. My site is divided into different categories and these are in different directories (folders) on the server. If you go into one of the categories without a valid link, a default page appears and redirects you to the nearest starting point in that category. This can also help protect you from curious visitors who may want to look through all your folders, it's not totally secure but will protect you to some degree from a curious visitor who is not too PC literate.

We are going to use a Meta tag, which most Browser software support. The tag format we are going to use is:
<META HTTP-EQUIV="REFRESH" CONTENT="5; URL=http://www.mynewlocation.com">

The refresh part tells the browser to automatically load (or reload) the URL we specify. The URL in this case, is http://www.mynewlocation.html, you would replace it with the full path to your new site. The content part of this tag tells the browser to load the new page after 5 seconds but you can change this to any number you like. The main thing to consider is that if you put text on the page that you allow enough time for your visitor to read it. The main goal is to let the visitor know that they are going to be redirected to a new page so that it doesn't come as a complete surprise. One thing to consider is including an ordinary hyperlink to your new page on the redirection page so that the visitor can select the link themselves. This also allows those people whose browser doesn't support the tag to know where your new location is and click on the link manually. I usually put the meta tag towards the bottom of my page so that the other elements on the page have had time to be loaded. I have included an example of this tag so that you may see the tag in action.

Of course, don't forget to update the various search engines with your new location. Many search engines allow you to register your site with a description/category of the content. One of the biggest problems associated with moving your web site or pages is retaining your loyal following, by having a page that redirects them to the new location you have a better chance of retaining them

Don't forget that this is a good way of handling situations if you reorganise your site. If someone has bookmarked a page and you change the location of the page a visitor might not return if they get the old 404 error. Retaining the old page name with a redirection facility can help them find your new page and shows that you care about them.

34. How do I know if other people have linked to my site?

It can be rather flattering to learn that other people have linked to your web pages. The question is whether it is because they found your pages interesting or whether it's to leech from your server. An example might be where they use images from your web pages to pretty up their own. It might be that they have a limit on the amount of space allocated to them and to save space they include links to your images etc which means that your images are working for them. This isn't to say that all people who link to your pages are leeching from them but you may just want to find out who is linking to your pages. Personally, I like to know who is linking to my pages, perhaps there's other information etc that I can add to my pages or maybe I can set up a link to their pages.

Here's one way to find out who is linking to your site and pages. In some search engines, you can search via a link option to see who has links to different pages etc. For example, in the Altavista search engine you can type link:http://www.mywebsite.com in the search text box to find out who is linked to your web site (naturally replacing the www.mywebsite.com with the path to your page).

At www.hotbot.com you just need to type the path to your web page to find out who is linked to your page.

At Infoseek you use the same technique as at Altavista, you type link:http://nameofwebsite in the search text box.


Do you feel that a question has been left out? Is there something that I have missed? Email me at


Top of Page  | Enigman's Home Page  | HTML Resources  | Javascript Resources  | Site Map |

Page maintained by Grant Schmarr,
Copyright © 1997-99 Grant Schmarr.
Created: 14th September 1997. Updated: 28th November 1999
Powered by O'Reilly Books