• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Part: VII Appendixes > The 24 Top Questions from Readers of Sams Teach Yourself...

The 24 Top Questions from Readers of Sams Teach Yourself HTML in 24 Hours

1:What should I read next?
A1: Try Sams Teach Yourself JavaScript in 24 Hours, Second Edition or Sams Teach Yourself Paint Shop Pro 7 in 24 Hours. You can find out more about both books and buy them online at www.mcp.com.
2:I'm stuck on my first page. It didn't work. What did I do wrong?
A2: The first page is always the hardest. If you see all the HTML when you try to view the file (by selecting File, Open in your Web browser), or if you see some weird characters at the top of the page, you haven't saved the file in plain text or ASCII text format. If you can't figure out how to do that in your word processor, use the Notepad or SimpleText editor that came with your computer instead. (WordPad is especially problematic in this regard.) Also check to make sure that the extension on the file is htm or html.

For more guidance on making your first page, carefully go over the first To Do section and “A Simple Sample Page” in Hour 2, “Create a Web Page Right Now.”

Also, remember that you don't have to be connected to the Internet to edit and view Web pages on your hard drive. (If your Web browser tries to connect to the Internet every time you start it, change the home page in the Edit, Preferences settings to a page on your hard drive.)

3:Graphics or media files don't work/don't show online.
A3: There are several common pitfalls you might encounter when putting graphics on a Web page:
  • Make sure the graphics file is in the same folder as the HTML document that refers to it. (If you're trying to refer to it in a different folder, review the “Relative Addresses” section of Hour 3, “Linking to Other Web Pages.”)

  • Make sure the graphics file is saved in GIF or JPEG format. Open the file with Paint Shop Pro (or another graphics program) and use File, Save As to save it again just to be sure.

  • Make sure the capitalization of the filename and the src= attribute in the <img /> tag match. MyImage.gif and myimage.GIF are not the same to most Web servers!

  • To get rid of the blue line around a graphic, put border="0" in the <img /> tag.

  • This one's unlikely, but possible: Do you have Automatically Load Images turned off under Edit, Preferences, Advanced in Netscape Navigator, or Show Pictures turned off under View, Internet Options, Advanced in Microsoft Internet Explorer?

  • True story: One reader spent four days trying to figure out why none of his images worked. He was typing <img scr= instead of <img src= every single time. Don't laugh—just check your page for typos.

Refer to Hour 9, “Putting Graphics on a Web Page.” If you're having trouble arranging graphics on the page, you'll find many helpful hints in all four chapters of Part IV, “Web Page Design.”

Audio and video files are trickier and more prone to problems. There's no practical way to make them work in every version of every popular browser, but refer to Hour 16, “Embedding Multimedia in Web Pages,” for as much help as I can give.

4:How do I get forms to work on my server?
A4: Ask your ISP to help you set up a forms-processing script. If they can't do it, you either need to find an ISP that is willing to actually provide some service or use a third-party form-processing service, such as www.freedback.com.
5:How do I put a counter on my page?
A5: You probably don't need one, since most ISPs send you a detailed report each week, summarizing exactly how many times each of your pages was accessed. You should expect this, but some Web hosting services (especially free ones, or those outside North America) just won't provide it. In that case, you need to set up a CGI script on your server. That isn't terribly difficult, and you'll find the code and some advice on how to do it at www.developer.com and other Web development sites.
6:I'm confused about frames. Mine don't work, and I don't understand why. Do you?
A6: Frames are tricky. It may take a couple readings of Hour 20, “ Multipage Layout with Frames,” and some experimentation before something clicks, and you see how the whole thing works. Here are some tips that may help:
  • Remember that you can right-click in any frame and pick View Frame Source in Netscape Navigator or View Source in Microsoft Internet Explorer to see the HTML for that frame. Selecting View, Source from the main menu shows you the HTML for the frameset document.

  • The only way to make a link change the contents of two or more frames at once is to link to a new frameset and include target="_top" in the <a> link tag.

  • You also use target="_top" when you want to break out of all the frames and go back to a regular single-page document.

7:How do I pursue a career in Web page design, and how much should I charge to make someone a Web page?
A7: As in any competitive business (and Web page design is a very competitive business), you need a solid marketing plan to be successful. If you've already found some clients, the amount you charge them is obviously up for negotiation. As a general rule, the going rate for experienced Web developers is between $25 and $50 per hour. If you are still learning, expect to charge less than that, unless you are already a professional graphics or publications designer with a loyal client base.
8:How do I make password-protected pages?
A8: The easiestway is to make up a weird directory name, put the pages in that directory folder on the Web server, and tell the address of the pages only to those who are authorized to access them. More secure methods abound, but all of them require some kind of prewritten script or advanced server software. Consult your ISP to see what kinds of security options they have available.
9:Where can I find Java applets and prewritten JavaScript?
A9: Try www.developer.com and www.infohiway.com/javascript/indexf.htm, or look in any of the major Internet search sites under Java or JavaScript.
10:I can't get a link to work. What could be wrong?
A10: Check the spelling and capitalization of the href link and the file to which you're trying to link. Some links will work on your hard drive, but fail on the Web server if the capitalization doesn't match. (This is because Windows doesn't care about capitalization of filenames, and UNIX does.) Also, review Hour 3 to make sure you understand the finer points of relative and absolute addressing.
11:I am having trouble getting JavaScript/Java/ActiveX code to work, even though I'm pretty sure that I got the syntax right.
A11: Please don't imagine for a moment that Microsoft and Netscape could possibly have bugs in their Web browsers, especially in the sacred Java and JavaScript modules. You are the problem. To redeem yourself, you must build a shrine next to your computer, paste gilt-edged pictures of Bill Gates and Marc Andreessen to it, and humbly offer it cold pizza thrice daily. If you do this with a clean heart and pure mind, all problems with code implementation will still be your own darn fault, but at least Microsoft might decide not to take legal action against you for it.

On the serious side, if you know who the author is, the best thing to do is to send him or her an email. If other options are available to do what you want to do, try another way. There are many ways to do the same thing and sometimes one way works when another doesn't.

Another option is to find a free or cheap debugger on the Web and run the code inside the debugger.

12:Where can I get more help creating graphics and multimedia?
A12: If you use Paint Shop Pro for graphics, try the tutorials at www.jasc.com or read Creating Paint Shop Pro Web Graphics, which is available through the JASC online store. Learning to work with audio and video is a more ambitious endeavor, but my Web Page Wizardry: Wiring Your Site for Sound and Action gives you a good head start. I also contributed chapters on working online audio and video to Web Publishing Unleashed: Professional Reference Edition. Both books can be purchased at www.mcp.com.
13:How do I put more “bells and whistles” on my site (a chat room, a hit counter, password protection, interactive sound, a pull-down list of links, and things of that nature)?
A13: Most of those involve JavaScript or CGI scripting (advanced stuff) to make them work. To help you go beyond what this book teaches, I've assembled a list of advanced developer resources at http://24hourHTMLcafe.com/hotsites.htm#developer.
14:How do I get a message to scroll along the bottom?
A14: You'll find JavaScript for that at both www.developer.com and www.infohiway.com/javascript/indexf.htm.
15:How do I put files on a Web site for download?
A15: Just upload the file in the same place you put your Web pages and use a regular HTML link, like the following:
<a href="bigfile.zip">Click here to download bigfile.zip.</a>

16:How do I put a browser on a disk? Do I need to if I publish Web pages on a disk?
A16: Most people have a Web browser on their computer these days, but if you want to provide one just in case, you need permission from the browser company.

I recommend Opera (www.opera.no), which is small enough to fit on a single 1.4MB floppy disk and allows distribution of free time-limited evaluation copies.

17:When I try to download Paint Shop Pro or the FTP software you recommended, the download is deathly slow or stops altogether. Can you help?
A17: I'm afraid there's not much I (or you) can do, except recommend that you try again later. And you thought you needed a car to get in a traffic jam?
18:Should I use Java applets and other advanced stuff?
A18: Not unless you need to do something you can't do any other way. Basic HTML is faster, more widely compatible, and easier to maintain.
19:How do I make a form for people to fill out and print?
A19: They can fill out and print any HTML form. Just tell them to do it. See the Q&A section at the end of Hour 7, “Creating HTML Forms.”
20:How do I justify text so it lines up with both margins?
A20: If you have a flat-panel screen, you could try scissors and glue. The CSS2 style sheet standard does support "text-align: justify" as a style specification, but none of the popular Web browsers can display full-justified text yet.
21:How do I publicize my site, and how do I find advertisers for my site?
A21: The first section of Hour 22, “Helping People Find Your Web Pages,” will help some, but mostly you'll need to come up with your own marketing/PR plan tailored to your specific situation.

There are a number of Web advertising services and companies that will pay independent Web publishers like you to run ads or affiliate with them in other potentially profitable ways. Most pay you a small amount each time a visitor clicks one of their ads. (See http://www.sitecash.com/guide.htm for some possibilities.)

22:How do I create HTML pages or links within email messages?
A22: Just type regular HTML as you would to make a Web page. Most advanced email programs nowadays (especially those bundled with Microsoft Internet Explorer and Netscape Communicator) allow you to create and view HTML Mail. You format it just as you would a document—no HTML experience required.
23:How do I open a link in a new window?
A23: Use target="_blank" in your a href link tag.
24:How do I link to a database and let people search my site?
A24: You'll need to give a software company some money for a good answer to that one. The most common solution these days is to use the FrontPage 2000 server extensions along with a Microsoft Access 2000 database. NetObjects Fusion is another one of the more popular and powerful options. One of many online stores where you can comparison-shop for this type of software is www.developerdirect.com.

However, there are some simple options, as you got a taste of in Hour 23, “Using XML to Describe Data.” XML files can be created in a text editor and it is a simple matter to read and process the data using embedded JavaScript. For more information on this, consult the book, Sams Teach Yourself XML in 24 Hours, by Charles Ashbacher. Advanced users can create their own ActiveX controls in Visual Basic that will read data from a database.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint