Comp25:
HTML Troubleshooting
Here are some tips of common errors for helping students with
their web pages. Please don't make the corrections for them. Help
them spot the errors and have them correct them.
General Troubleshooting
Missing or Improper Closing Tags
Almost every tag in HTML needs to be "closed". If you
have <h1> you need to end it with </h1> or your entire document
will be one giant heading.
Missing Quotation Marks
The syntax of HTML requires that MOST of the references
following the equals sign to be enclosed in quotation marks,
such as:
<img src="bettyboop.jpg">
<body bgcolor="#00FF00">
<p align="center">
<body background="clouds.gif">
Uploading and Viewing Your Website
If you can see your U: Drive but you don't have a web-docs
folder...
That's okay. You can create the web-docs folder from
your U: Drive just by making the new folder manually. Make
sure it is called "web-docs" exactly, with the hyphen.
If you can't access my U: Drive because you're not on the Pacific
network...
You'll have to use the
WebFolders website
to upload your files into the web-docs folder.
If the index file in your web-docs folder looks like a notepad
icon, not a web page...
You need to
reveal
your file extensions and then rename your file to "index.html",
not "index.html.txt".
If your website is just a big blank page...
You likely forgot to close the </title> or </head> tag at
the top of your page, or you never started the <body> tag.
If you get a Forbidden error when you visit your website...
You need to
reset the permissions on your website and try again.
If, when you visit your website, you see a listing of files instead of
your fancy new page, or you get a File Not Found error...
Either your file is not called "index.html" or you did
not save it to your web-docs folder. Rename it, or
move it into the web-docs folder. Make sure it is in
all lowercase letters.
Page Appearance
If everything is indented like crazy...
You started an <ul> or <ol> tag but didn't finish it.
If all the writing is really, really big...
You started an <h..> tag but didn't finish it.
If my whole page is centered...
Sometimes when a document is completely centered, and you
can't find where the </center> should be, don't look for the
center off tag…instead look to the <h1> or <h2> tag that wasn't
closed. It probably looks like this:
<h1 align=center> text here <h1>
Notice there is no / closing the h1 tag. This cause the
entire page to stay centered. In this case the centering is
associated with the heading style.
Images
If I get a broken image icon...
When pictures don't work in the browser, right-click on the
broken picture and examine the Properties. The Properties dialog
box will tell you what the browser is looking for to display in
this location. The HTML code and the full filename,
including the three-character extension, must match exactly.
Always compare the HTML code to the actual files on the
computer to be sure they are named exactly the same, including
the extensions.
File-naming errors can be solved in one of two ways:
- Rename the file
- Edit the source code to reflect the correct filename
If I get a broken image icon and that image is hosted on someone
else's web server...
Many times a webmaster will prevent people from using images
located on their own server. If they didn't, they would
have higher internet bills for each time someone used one of
their photos.
If you want to use a photo on someone else's server you
should save that image to your web-docs folder and link to that
instead. Right-click on the image and choose Save As, then
save it in web-docs with an appropriate name.
If your picture is too big...
Ideally you should edit the image in a program like Photoshop
or Paint. If you can't do that, use the width and height
attributes on the img tag.
See this page for
help on how to do that.
Links to Pages and Files
If half the page is one big link...
You forgot to finish off the <a> tag.
If the actual <a href..." code appears ON my webpage...
You forgot a quote in the href attribute. The website
address or page must have quotes on both sides.
When I click on a link to another page in my site, I get "File
Not Found"...
Internal link errors are always caused by wrong filenames.
If the link from index.html to products.html does not work it
means that the <a> tag in the index.html page is incorrect.
It does not mean that there is anything wrong with the products
page itself.
Perhaps the href in index.html is pointing to products.htm,
rather than products.html. (Notice that one is .HTM and
the other is .HTML).
Perhaps the href is looking for products.html and your file
is called product.html. (Notice one has an s and one does
not.)
Remember the proper syntax for an internal <a> tag is:
<a href="products.html">My Products Page</a>
Links to other Internet Sites
When I click on a link to a page on the internet, I get "File Not
Found"...
If your external link does not work, it is likely because you
forgot to type http:// in front of the website address.
Here is the syntax for external <a> tags:
<a href="http://www.pacific.edu">Go Tigers!</a>
It might also be that the page you're trying to link to has
moved or is no longer running. Check the link by typing it
manually into your web browser.
If that still works, double-check your HTML code.
Links to Email
If you click on the link to test an email and it says something
about Groupwise...
In the computer lab, your default email is set to Groupwise.
That's just how it is, so you can't really test it from here.
Try it from home.
When I click on a link to an email, I get "File Not Found"...
If your link to an email results in an error, you probably
forgot to include the mailto: portion of the href attribute.
Here's how it should look:
<a href="mailto:cschuler@pacific.edu">Click here to send me mail</a>
|