[an error occurred while processing this directive]
Go to Bottom Nav - September 18, 2021 - No exercises at this time - ERRORblah Happy Holidays and Semester Break!

The plain text files that form your web site need names when being saved with your other web files. With few exceptions, you may name your files as you wish; they will all share the same ".html" suffix. Here are some guidelines.

Some Good Ideas

You will make your life much easier if you follow a few general rules when it comes to file names. Although these hints are slanted towards UNIX servers, they are also good for use on others.

  • All of your web page files for this class will end with a ".html" or ".htm" suffix. This informs the web server of the type of file it is and your web browser how to display the page.
  • Keep the names simple and descriptive. Notice this html file is names "files.shtml." Easy for me to remember something about the contents without having to open it.
  • On UNIX servers (such as the one we are using, webhawks.org), files names are very case sensitive. Working locally on your desktop PC or Mac, files are not case sensitive, so you can be fooled until you upload them. Fun.hTmL does not equal fun.html.
  • Spaces count as characters in a file name. LEAVE THEM OUT! Use a dash "-" instead. my-cat.html works, my cat.html doesn't.
  • Leave out special characters. Inch marks ", foot marks ' , < , > are all used in your coding. The ?, %, &, and others can be used for other functions such as querying a database. Stick to the basic "-", and "." and simplify your life.

The Importance of index.html

One file name that is "reserved" is index.html. It is recognized as the default "home" page by most servers.

When you send a request for a server directory instead or a specific file, the server searches for a file named "index.html" or "index.htm" in the directory. If it doesn't find one, it will generate its own. Try looking in this directory: http://art.wallyzone.com/dm60a/tutorials/no_index.

Name the "home" page in your main directory index.html. This allows you to determine what you want your user to see via the links on that page rather than allowing them to browse through your files like the link above. Also place an index.html file in each sub directory that you do not want browsed.

Keep life simple: descriptive lower-case simple .html-suffixed file names that contain no special characters or spaces. Easy!

Heading One
Ut pharetra, ante eget imperdiet ullamcorper, tortor nunc sollicitudin orci, non cursus neque nisl eget ligula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vestibulum, nibh in suscipit interdum, velit magna volutpat turpis, at ornare sem magna et tellus. Sed pulvinar facilisis ligula, id vehicula eros sollicitudin a. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Heading Two
Vivamus vestibulum, augue id iaculis sodales, odio odio feugiat arcu, scelerisque congue nisi ipsum vitae orci. Nunc sed ligula quam. Cras sed iaculis neque. Proin ultricies consectetur tortor, eu pulvinar sapien commodo ac. Cras diam arcu, lacinia id mattis ut, convallis sed massa. Nullam ut arcu lacus. Suspendisse ultricies elementum arcu ut dictum.
Heading Three
Sed aliquet augue ut ligula porta gravida pellentesque sapien semper. Duis mauris massa, semper pulvinar eleifend id, tincidunt fermentum nulla. Proin ipsum neque, imperdiet in vestibulum non, hendrerit ac nisi. Maecenas eleifend libero quis urna lacinia elementum. Etiam mi massa, sollicitudin nec accumsan in, aliquet in dui. Pellentesque consequat diam quis felis luctus a vehicula lectus mollis.
Pull Down Menu Close Menu