At the end of every good lesson comes a question-and-answer session. For the past few weeks, I have received your questions and comments regarding my series of articles entitled “A Crash Course in HTML,” which are now available as a TechRepublic download. Now that I have your questions, it is time for me to cough up some answers. So here we go.

Q: When I write HTML and view it in a browser, all of the HTML code shows up as well, and the entire document is just plain text and tags. What am I doing wrong?
A: More than likely, problems such as this stem from the way you save your HTML document. If you are using a program such as Microsoft Notepad to write the HTML, when you save the document you must specify that the document is an HTML file. You can do this by choosing “All Files” under Save As Type and naming the file with the .htm or .html extension. An example of this would be index.html.

Q: How do you write the HTML tag that shows a pop-up message when the mouse is hovering over an image?
A: In order to have that little pop-up message box, you must include alt=”message goes here” within the image source tag as shown below.
<img src=”image.jpg” alt=”message goes here”>

Q: I’ve seen many Web sites where links change their appearance when the cursor moves over them. (They become highlighted or “pop” up.) How is this done in HTML?
A: This is called a mouse over, and it actually has nothing to do with HTML; it is JavaScript. You can find out more about JavaScript by searching TechRepublic’s Web site. Essentially, you have to have two images, and the script tells the browser to replace the first image with the second whenever the mouse hovers over that image.

Q: Is it possible to use text as a hyperlink without the underline?
A: Yes, this requires something called Style Sheets. The code for this function isn’t as complex as a mouse over, however. You have to include the following code between the head and the body:
A:link {TEXT-DECORATION: none}
A:active {TEXT-DECORATION: underline}
A:visited {TEXT-DECORATION: none}
A:hover {TEXT-DECORATION: underline}

Q: I want a line to end at a certain point and then go to the next line without a blank line. How can I do this?
A: Blank lines appear after every defined paragraph. If you would like to start a new line without the use of paragraphs, you must use the break tag (<BR>).

Q: Where does one write the code? Which application do you use?
A: You can type HTML code in any word processor and save the file with the .htm or .html file extension. You can also use a wide variety of HTML code editors, such as HomeSite, and WYSIWYG editors, such as DreamWeaver; however, plain old Notepad will do.

Q: I have written my HTML document; now how do I view it?
A: You can view your HTML document without it actually being up on the Internet. Open your browser and choose File | Open; then, point to your HTML document.

Q: Which WYSIWYG editor would you recommend?
A: I recommend using Macromedia DreamWeaver. In fact, I have just written a series of articles that explains the ins and outs of this wonderful program.

Q: Is there a book on the market that you would recommend for learning HTML?
A: I am a big fan of the computer books published by O’Reilly. I have found them informative and easy to understand.

Q: Is there an HTML solution to keep the column headings of a table visible when scrolling down a page containing lots of rows?
A: The answer to your question is a frame. You can set up two frames by using one at the top of the page and one at the bottom. This way, the top portion of the Web page remains stationary.

A word about frames
Setting up frames in HTML code is a more complex process than what my crash course in HTML covers. However, I am working on developing an article with such higher level HTML code tactics and tips. Keep your eyes open!

Well, that’s all, folks! I hope that I was able to answer your questions. If there are any more, please don’t hesitate to send them my way. I will do my best to respond to them via e-mail.
Do you have an HTML question you’d like Jason Smith to answer? We want to hear from you. Post a comment below or send Jason an e-mail.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays