The Official HTML Goodies FAQ
WEBINAR: On-demand Event
Replace Oracle with the NoSQL Engagement Database: Why and how leading companies are making the switch REGISTER >
The HTML Goodies Web Site receives an average of 200 e-mailed questions every day. After all this time, I still try my best to answer every one. What follows is a good representation of the questions gathered during a three-week stint in August of 1997. There are 250 questions in three sections.
For this section, I've tried to gather questions that aren't covered in the tutorials. Most of the answers I give direct people to certain sections of the Tutorials. The following questions required something more than a redirect.
I've cleaned up the grammar and the language a bit, but for the most part, I took these questions and answers right from my e-mail program's out box.
1. Q. You state that I should always surround commands inside commands in quotes. Sometimes I see pages where people don't. They write something like <IMG SRC=image.gif> Well... should I use it or not?
A. I'm a traditionalist in terms of HTML. If you want my opinion... yes, do it. But, later-version browsers require the quotes less and less. I still use them because I think they serve the purpose of setting the commands apart from the rest of the page, if only for my eyes. Just remember, if you use them, use them all the time. Using them now and again easily leads to forgetting to add a closing quote on a subcommand. That will cause problems.
2. Q. Do I really need the </TD> and </TR> at the end of a table? I made a table without them and it worked just fine. What gives?
A. You really should. If you only have one table on a page, there won't be any interaction problems. However, if you use images in your table cells, you can run into trouble. Same deal if you have more than one table on a page. You should use them.
3. Q. Does it matter if I capitalize the HTML commands or not?
A. Nope. I do for my own eyes. It helps me find the commands in the document quickly. However, the browser could care less.
4. Q. Should I always put new commands and sections on new lines?
A. The browser could care less. You could write your pages in one straight line and it would look the same. I would suggest you do it only to keep it all straight when you look at the document.
5. Q. How do you make text blink?
A. <BLINK>text text text</BLINK>
A. My guess is that you are using MS Explorer. It tends not to see text pages as text but rather as something to run. The script is there. It's just that the browser has run it instead of displaying it. Download the page by using the Save As command under the File menu. You'll then have the script.
7. Q. Is there a difference between using the hex color codes and using the word color codes?
A. Only if someone is using a very early level browser like 1.0 or 1.1. Those do not recognize the word color commands. Other than that, no. Take a look here for further explanation.
8. Q. Do I need to have the # mark in front of color hex codes?
A. Not by today's browser requirements. However, there are still some older level browsers out there and it would be nice to allow them to read your pages with few or no errors. I am an HTML traditionalist. I put it in.
9. Q. How do I get rid of the border that surrounds an image when I make it a link?
A. Add the command BORDER="0" between the IMG and the SRC in the image command.
10. Q. My whole page is one giant link! It's all blue and underlined! Help!
A. It looks bad, but it's easy to fix. You have forgotten, or incorrectly written, an end anchor link. Go to the beginning of the blue and I'll bet it's a link. That's the one missing the </A>.
11. Q. My frame commands look correct but nothing comes up in the page.
A. Assuming they are correct, you may not have offered enough commands. Every needs to be closed. Explorer is a little more forgiving on the missing end commands than Netscape, so the page may still work in MSIE, but to get it to work on all frame-ready browsers, make sure there's a beginning and end frame set for every one you write. Look here for further explanation.
12. Q. How do I stop people from looking at my source code?
A. It's tough. There are some methods being tried that encode your source so it's just gobbledygook to the viewer. I haven't seen the program offered as shareware, though. The problem is that once the page is displayed, it's in the viewer's computer. Even if you did have the ability, I could simply go get the file from my browser's cache and look at the code in a text editor. Even if I couldn't, I know enough about HTML to simply duplicate what you have written. Source code is really tough to hide.
13. Q. How do I stop people from stealing my images?
A. You really can't. Even if you can stop me from downloading, I can always do a screen capture and then I have the image for myself. The Net's a tough place to padlock things.
14. Q. Do I need to copyright my pages?
A. Define "need." I would. Even if you feel like a very giving person, having your ideas and hard work profit others is a bad, bad feeling. It only takes placing the (C), the year, and your name on the page. Take the time to do it. Look here for more info.
15. Q. Which is better, .gif or .jpg format?
A. It depends on what you want to do. Both have pretty good clarity. I would go with .jpg for large images to save on transfer time. They are compressed so fewer bytes have to transfer. I'm a big .gif fan myself. It's a memory thing: .gif only requires the memory equal to its size; .jpg needs to be "blown up." It has a tendency to crash browsers running on systems with small memories. Check here for more info.
16. Q. I cannot get my images to show up on the page. Why?
A. Three things could be wrong:
1. Is the image corrupted? Can you open the image in the browser all by itself? If so, then the image transferred okay. That's not it.
2. Is the name of the image exactly the same as the name you are calling for? Note capitalization, too!
3. Do you have the A:\ or C:\ path in the image command? Lose them. Those paths exist on your computer, not your server.
17. Q. My hypertext link doesn't work, but all the commands are correct!
A. Check for a missing quote. Check for a missing dot. Check if the address is correct. If the commands are correct it would work. There must be a problem somewhere. Just keep looking it over. You'll find it.
19. Q. My page shows up in the browser window with a few words and then these boxes and strange symbols. What is that?
A. Like boxes and such? You missed the </TITLE> command. I'll bet money on it.
20. Q. My HTML document shows up in the browser window with all the commands showing. Why?
A. My best guess is that you saved it with a .txt extension instead of a .html extension.
21. Q. How do I get the < and the > to show up on the page?
A. You need to write the < and > as an & command. This: < represents a <. This: > represents a >. Don't surround these commands with < and >. Place them on the page just as I show them.
22. Q. Is it possible to own your own server?
A. Sure. I'm looking into one. They cost, though.
23. Q. How much does your own server cost?
A. I can only speak for my own research into them. I found a Sun SPARC 5 machine for around $4500. That doesn't include the hard drive or the memory. I'll probably put in a 4 gig HD and 64MB of memory. The software costs a bit then. Prices for server software are also pushing a grand. From Joe Smith (1/31/98)
The latest low-end Sun SPARC is $3000. A lot of people are running the Apache server on small Pentiums and 486s running Linux. For those of you who don't want to learn how to be a UNIX system administrator just to put up a Web server, http://www.sambar.com has a Web server and http proxy that runs on Windows-95 and Windows-NT. (That's what I'm using at http://inwap.fremont.ca.us/ChezInwap/inwap/ .) The software (Linux, Apache, sambar) is all free. You will have to pay significantly more than $19.95 per month to connect your server to the Internet.
24. Q. I was wondering if there is a way to embed a RealAudio sound?
A. It depends. You can always try it. If your server has the MIME files configured correctly, and if the person viewing the page has the 3.0 version of the RealAudio player, and the Net isn't too congested at that time, then you may be successful. Look here for more info.
25. Q. I am using a "mailto:" form on my Web site, the output is horrible. I receive a single string of data that is hard to read. Is there any way to format the output of the forms?
A. You need to delineate the mail into straight text. Add this command in the beginning FORM command: enctype="text/plain". That should take care of it.
26. Q. Is there a way to get an image to act as a button to send a form?
A. Yes. Once you have an image, use this as your send button code:
<INPUT TYPE="image" SRC="button.gif" BORDER="0">
As long as this is inside the begin and end FORM commands, it will execute the form's mailto: activity.
27. Q. Can I put an image on one of the link buttons?
28. Q. Sometimes I try to get into a page and I'm told the page doesn't exist, but I know it's there. Why?
A. Net congestion probably. Servers do have a limit. If a lot of people are trying to attach, then you may be told you can't come in. The problem is that servers have very few error codes. One code can mean many things. It can be confusing. The server is full. If you try a couple of seconds later, you will probably get in, but you'd never know that from the error code.
29. Q. I keep trying to go into a page that I was in before. Each time I try, though, I get a message saying the page contains no data. I was there yesterday! I know it contains data! Why does it keep doing this?
A. Some pages don't exist unless something is done to create them. Many pages are what is known as "virtual." They are created on the fly by the user doing something like ordering an item or filling out a form. So, without the user doing that, there's no page. You cannot link right to it.
30. Q. How do I get my pages and images from my hard drive to the server?
A. You FTP (File Transfer Protocol) them to the server. I wish I could tell you exactly how it's done right here, but I can't. There are just too many different methods of sending files. I can offer this, but I'd also suggest that you contact your server technician. He or she will be far more help than I will be.
31. Q. My pages have images on them. They work great on my hard drive, but when I put it all on my server, the images don't show up. What's the problem?
A. You have corrupted the image in the transfer to the server. Make a point of sending your image in BINARY or RAW DATA format. Check here for some more info. You may also want to talk to your server technician. There are many ways to transfer a file. See what particular method they have chosen.
32. Q. What does the little box with the red X in it mean?
A. Microsoft Explorer, huh? That X means that there should be an image there, but for some reason, it can't find it or can't display it. Check your spelling and capitalization of the image name and the name you are calling for first. You may also want to check here for some more info.
33. Q. What does the image with the square, the triangle, and the circle in it mean?
A. That means an image will go in that space. It just hasn't loaded yet.
34. Q. What does the broken image icon mean?
A. That means an image should go in that space, and there is a file by the name of the image that is supposed to go there, but the browser cannot display it. Most likely the image has been corrupted in the FTP transfer or is an image format other than .gif or .jpg.
35. Q. What does the square with the question mark inside it mean?
A. That's an icon meaning that the image that is being called for is nowhere to be found.
36. Q. How can I disable printing of a particular page?
A. I don't think you can. I may be wrong, but I have never heard that it could be done.
37. Q. How can I make it so that when someone prints my page, I denote where the page breaks occur?
A. I have never heard of a way. I don't believe it's written into the HTML code... yet.
38. Q. How do you limit the amount of characters in a text box?
A. Add the command MAXLENGTH="-" inside the text box command.
39. Q. I am trying to make a midi file play in the background of a Web page. After it has loaded, I don't want to see the little music bar, etc. How can I do this?
A. The music bar is an image. You have the ability to make it as big or as small as you want. Set the HEIGHT and WIDTH to 1. I don't think you can set them to zero. You could also try adding the command HIDDEN="true", but the height and width deal will work on all levels.
40. Q. How do I put text over an image?
A. With HTML alone, you mean? I don't know of a way. Text on top of an image has to be done using a graphics program or by using Layering in Netscape or Style Sheets in MSIE.
41. Q. How do I activate successive .WAV sounds? I want to have each sound activate one after another.
A. You will need to get a sound editor and copy and paste the sounds all into one large sound file. I know of no way to play successive files. You might be able to set it up through meta commands so that the page changes to a new page and a new sound file every few minutes or so, but then you are taking a pretty big chance that the entire sound file will download and play in the time you allocate. Depending on Net congestion, you may not be able to call it correctly every time.
42. Q. Is there an HTML command to space words apart horizontally?
A. It's an & command, actually. You need to put spaces between the words, but just adding space on the keyboard won't do it. Use this: That thing creates one space.
43. Q. I have uploaded an applet onto my server. When I look at the page, all I get is a gray box and an error. But it works fine on my hard drive. Why?
A. The applet was corrupted somewhere in the transfer from your computer to the server. Try it again.
44. Q. Can you tell me how to get rid of the horizontal scrollbar at the bottom of my page?
A. Don't use images that are too wide for the page.
45. Q. How do I get my link colors and my background the same color?
A. Why would you want this? The links will be hidden. Anyway, set the BODY BGCOLOR and the LINK color setting to the same hex code or word color code. To ensure that the links remain hidden after they are visited (if anyone can find them), set the VLINK color to the same color code.
46. Q. How do I get rid of that space around a table frames image?
A. It's a neat trick. Place a TR before the TD. Then make sure the /TR and /TD are on the same line at the two begin commands. Like so:
Just make sure the two end commands are on the same line as the begin commands.
47. Q. Can you tell me if there is a maximum number the counter goes to before it resets to zero? Someone with a Web page on my server is trying to blame the server for his counter going back to zero.
A. It depends on the counter. Counters work by creating a record of the count somewhere, be it on the server hard drive or on the user's cookie file. The count will keep going ad infinitum. However, the counter may be only five numbers wide. When the counter hits 100,000, it may appear to recycle, but actually it's just not long enough to display the one. Fix it by adding a one in HTML code before it. As for the server setting the counter back to zero... maybe. Again, it depends on what happens to the count file. If it is erased when the server shuts down, then you're back to zero. Check this out for more info.
From Joe Smith:
When a counter goes to zero, it usally means that the person who wrote the counter program screwed up and forgot to use file locking. If you get two hits within a few milliseconds of each other, a race condition can allow the second access to wipe out the counter file, setting it to zero. (This actually happens quite often.)
48. Q. I was wondering how you can make a link in one frame of a page open the link in the other frame. Can you please help?
A. You need to target the output of the HREF link. See the original frames tutorial section on targeting.
49. Q. How can I know if someone is stealing one of my images?
A. Every server has an access log that keeps track of every other server that requests files from your site. Try to gain access to that log. You can then look through it and see if any sites other than yours are calling for your images.
50. Q. How can I keep a counter on my pages that no one can see?
A. I know a pretty sneaky way. Whatever the code is that placed the counter on your page, duplicate it on a dummy page only you know about. You know a counter is an image. Just set the image's height and width to one. I don't think you can set it to zero, but try if you'd like. Then no one can see the counter but you. You go to the dummy page. It reads the same file that is counting for the real page. You see that other page's count. Clever, huh? You may also want to check this out for more info.
51. Q. I'd love to have a sunset or sunrise background for the 1st page of my site, but couldn't find any good ones. In the end, I found a sunrise picture on the Net, but its size doesn't fit for a background. It is rather small. So as I use the command: <BODY BACKGROUND="sunrise1.gif">, the picture duplicates itself so as to fill the remaining area. So the result turns out not good. Can you help me?
A. Backgrounds are tough. Either the image blends together nicely or it looks tiled. But in your case, you'd like an image to span the entire screen. That's hard. First off, you will have to make an image file big enough to cover all screen resolutions from 800 through 1200 pixels wide. So right off, you're going to cut off the image on some screens, or start the tiling on the larger screens. Plus you'll have trouble with downloading. Any image that large will need to be a whole lot of bytes. It will take a while for it to download. Will your viewer wait? You may want to go with a smaller image.
52. Q. I am trying to put sounds on my Web page and I copied the embed SRC command and put the .midi file name in it and everything but it doesn't seem to start, it just does nothing.
A. Do you have the midi plug-in? That's required. Just having something that plays sounds will not do it. Browsers need the plug-in. You can find different midi plug-in programs by going to a search engine and entering the keywords "midi" and "plug-in." Look here for more info.
53. Q. I was wondering what kind of banner rotation/redirect CGI script you are using on your page. I want to have a rotating banner on my page, but I can't find one.
A. I use Central Ad Pro's C++ banner software. See them at http://www.centralad.com. See also these tutorials for more info.
54. Q. How do I convert an image from a PICT file or a Photoshop file to a .gif or .jpg?
A. First you have to have a graphics program that will save in those formats. There are a few different ones on the Net. Paint Shop Pro is good, as is a series of other .gif converter programs. Open the PICT image in the program. Then choose SAVE AS from the FILE menu. When the box appears, change the format to .gif and re-save the image with a new extension.
55. Q. Could you add a search engine to your page (or something like that) so we can find what we want easier?
A. I already have it. See the Search Page.
56. Q. I'm new to Web page designing and I would like to have some information. My ISP told me that I can use Java applets only if the extension is .cla not .class. The one I'm using is, of course, .class. I would like to know if I can just rename them or do I have to do something else?
A. I have always been of the opinion that the entire .class extension is needed. But there are so many different servers out there that I could be wrong. You may want to make sure that's the case with your server technician. As for renaming the applet, maybe yes and maybe no. Some applets have their name in the actual code, so changing the name messes up the process. Some applets work in tandem so changing the name means the applet is calling for another applet that no longer exists. Others do not refer to their names, so you can change it. Which is which is a tough call. Check here for more info.
57. Q. What about WebTV? Can I use HTML for my e-mail?
A. I would assume. Try this format.
<A HREF="email@example.com">click here</A>
58. Q. I have been trying to get an image in a table, but after I put in the command it says "file C./WINDOWS/TEMP/"ball1.gif" could not be found." What should I do?
A. That's because the C./path isn't on the server. It's on your computer. Lose the paths that refer to your hard drive. Just call for the image by name and place it in the same directory as the page that is calling for it.
59. Q. Is there an HTML tag to put a space between the words?
A. Yes. This is equal to one space in HTML.
60. Q. I have a few .gif files on a page; some I made, some I copied from other sites on the Net, like .gif libraries. When I put a copyright notice on my page, I do not want to imply that the .gif buttons, etc., are my property.
A. If the image was offered to you without copyright then you shouldn't be too worried. You may want to augment your copyright notice to state "excluding images."
61. Q. I am acting as a Web site developer. I have created an online catalog from a printed catalog of my client company. His catalog is not copyrighted (whole other question on whether it should or could be). I want to copyright the Web site design etc., but who is the real copyright holder?
A. First off, I am not a copyright lawyer. That said, in terms of the design? You. Copyright it on your page by writing something to the effect of Web page layout and design Copyright 1997 by (Your Name). Also, suggest highly to the client that he place a copyright on his stuff or someone not as nice as you might grab it. Look here for more info.
62. Q. How do you start an embed MIDI without having the little control panel pop up? Can't you just have the music start w/out anything coming up on the screen?
A. Yes. Set the image height and width to zero.
63. Q. I would like to have my first page being rather bare, with links to different subject that I write, but I understand that I have to have a link to those places and I don't know how to get that link, even though it will be on my page! Are you getting my drift? Example. Page 1: a welcome page with several person links
Link 1. Personal
Link 2. subject
Link 3. subject
Link 4. to other areas on the net.
A. You will make each link to a page on your site. Let's say your site is http.//www.page.com/~mary. Your pages below might be named personal.html, subject.html, and areas.html. The links would look like this:
<A HREF="http.//www.page.com/~mary/personal.html"> Personal Page</A>
<A HREF="http.//www.page.com/~mary/subject.html"> Subject Page</A>
<A HREF="http.//www.page.com/~mary/areas.html">Areas Page</A>
64. Q. I was wondering if you figured out how to get rid of those question marks in the address screen I get whenever I click on those clickable, gray, rectangular buttons. I went to other Websites and when I press on those buttons, I don't see question marks.
A. My guess is the people who don't get question marks are using Java-based buttons. See this link section for a few buttons.
65. Q. I was wondering if I could color frames?
A. There's no way that I know of... yet.
66. Q. My background won't work. Could you please look below and tell me what I'm doing wrong?
A. Well, the commands look correct, but you have it all in capital letters. Is the name of the image in caps? If not, change the command to the caps configuration you used when naming the image. The two names have to be completely equal.
67. Q. What's all the fuss about HTML 4.0? Do you know anything about it?
A. You can read about it until your head pops at http.//www.w3.org. There are some updates, new codes, and a few little things to be concerned with. See what you think. You may also learn a few things here.
A. Correct. However, the problem comes in proving when you wrote it and that you wrote it. You need to make some sort of record of when you made it. This must be a record permanent enough to stand up in court. Maybe by mailing it to yourself? Check here for copyright Q & A.
69. Q. I'm trying to send an e-mail to 2 people through only one link.
<INPUT TYPE="button" VALUE="Click Here to Write to Me" onClick="firstname.lastname@example.org? email@example.com'">
Now, you'll have to change out the addresses, but this script will send the two address the same piece of mail.
70. Q. I run this site that I don't want people to leech off. How do I make the page secure?
A. No way. I hate to sound so final, but there's no way you could stop me from getting your stuff. Even if you secure it with all the things Netscape claims to be working on, all I have to do is perform a screen capture and bingo -- I've got it. If I really, really want it, I can always just copy it though dictation. The Web is great, but it's an easy place to steal from.
71. Q. I've been trying to design my Web page with a color side bar and I've been using tables to get the text into the different color areas. The only problem is there is by far less text in the bar than there is in the main section and all the info in the bar drops to the center of its column instead of the top where I want it. Make any sense?
A. I'm with you. You need to "bump" up the text in the lesser cell. You can do it by adding the command VALIGN="top" to the TD command. VALIGN means vertical align. Or add these after the text. Either way.
<P> <P> Each is a series of three blank lines. Slowly the text will bump up. Go here for more information on Tables.
80. Q. Will you write HTML code for me if I tell you what I want?
A. No. I gave up writing code for anyone other than myself a long time ago.
81. Q. Is there a way to reduce space between table rows so that they look more like a list? The closest I can get looks like double spacing, while I'd like the table to be single spaced.
A. Yes. Set the cellpadding and cellspacing to zero. Or just go with one table for each section, although setting the two above to zero will probably do it. Go here for more information on Tables.
82. Q. Can you use HTML on e-mail?
A. It depends on the e-mail program. Some will read it and some won't. I would stick with text.
83. Q. If you can tell me how to run my HTML document through a browser on my MAC that would be great.
A. 1. Save your document to a disc. 2. Open the browser (Netscape). 3. When the browser loads, choose OPEN (or words to that effect) from the browser's file menu (not the MAC desktop). 4. You will be given the dialogue box. Change to floppy disc. Choose the document you saved and click OK. That should do it.
84. Q. How do you password-protect WWW pages?
85. Q. How do you make a chat room?
A. There are a couple of ways. The easiest is to allow someone else to make it for you. See my chat room tutorial for a few links to sites that allow you to set one up using their servers and interfaces. Yes, it's all free. For now, at least.
86. Q. I've used your tutorial for making a form, but when the form comes up none of the text boxes are named, there are just blanks. Can you please help me correct this error?
A. You need to name the boxes yourself. If you just put up the commands, all you will get are boxes. You need to surround them with text so people know what to put in them.
87. Q. I am new to the field of HTML but I think that the author of a page could prevent printing by canceling the print button click. What do you think?
A. There could very well be a way, but I have never seen or heard of one. I would think the reason is because it wouldn't stop people from stealing anyway. Computers are tricky deals. There are many ways to do the same thing.
88. Q. I have added Web pages and edited some but I would like a way of keeping track of how many hits they get--without having visible counters on every page. Any suggestions?
A. Yes. Gain permission to the access logs for the server. There are programs available that will tally the hits for each page. I use something called Surfreport. It is fast and is far more reliable than a page counter. It does cost though. Mine was $300 plus. You may also want to check this out for more info.
89. Q. How can I put a clickable icon on my page that will allow traffickers to download my software files?
A. You need to make that icon active and point it right to the software. Since the software is not a file type the browser understands, it will ask the user what to do with it, and that will create the download.
90. Q. I have just read your section about RealAudio. I have been using the embed command linking directly to a .ra or .rpm file and everything works fine. Linking directly to a .ra works with Windows, but not with Mac; the .rpm seems to work with both. Do you have an explanation why my links work without creating a meta file?
A. My guess is that your server was already configured at the mime files to do that. You're lucky. You have a good server going there. They must be up on things.