In this lab, you'll make an a complete web site for "[Your Name]'s Pet Shop." That is, your site will have several pages of content on it, navigation links to/from the various sections, and a consistent site look.
You've already shown that you know how to add content to pages in your homework/past labs. Due to time constraints, each page will have only a minimal amount of content on it. Obviously, if you were doing this page for a real company you would add more content. The focus is on you showing that:
On a few of the more difficult / newer steps, I've included tips on how to do it. Whenever you see a little footnote icon like this one here1) just hover your mouse over it to see the hint. Additionally, all the footnotes are placed together at the bottom of the page. So, don't scroll down and view all the footnotes together. If you do, you're only hurting yourself.
You should make several copies of the XHTML/CSS template. Name the copies:
Additionally, make a blank text file named something to the effect of petshop.css.
To create a consistent look across sites, you'll want to modify each page to use an external CSS file. So, on each page remove the <style> tags and the content within the <style> tags. Now, instead put this somewhere in the <head> tags:
<link rel="stylesheet" type="text/css" href="petshop.css" />
Remember how I said that we shouldn't use tables for navigation / website layout? Well, too bad because we're going to use tables until we learn something better. On one of the pages, add the HTML to make a table that looks something like this:
_____________________ | Current Page Name | |_____________________| | lnk1 | Your content | | lnk2 | will go in | | lnk3 | here! | |______|______________| | Phone#+Address+Hours| |_____________________|
Be sure to give your navigation table an id of "navtable"2). We'll use this to give it a look different from other tables later.
On the left hand side (where it says lnk1, lnk2, etc) make an unordered list whose items are links to the various pages (index.html, pets.html, location.html). For this navigation list, give it an id of "navlinkslist". Now put the "Current Page Name" part in <h1> tags and the "Your content will go in here!" part in a <p> tag.
By default, the browser may try to keep all the data centered vertically. So, when you (eventually) add lots of content the navigation links will no longer be at the top of the page. Fix this by setting the valign attribute for the navigation td element to "top"3).
Make up a fictional phone number, address, and hours of operation and place it in the appropriate table section. Put it in a <p> tag whose id is "footer".
This HTML will be your template, kind of. Copy and paste this HTML into the rest of your .html files, so that each page has a consistent layout and all you'll need to do is change the content of each h1 tag to match what that page is about, and then add content.
Each bullet point should be a separate paragraph. It can be a very short (1 sentence) paragraph.
Do this section as quickly as you can, to leave ample room for the CSS section.
For the index.html page:
For the pets.html page:
___________________________ | Pet Type: | Guarnt. | $$ | |___________________________| | pet type1 | 7 days | $5 | |___________________________| | pet type2 | 14 days | $15 | |___________________________| | pet type3 | 30 days | $50 | |___________|_________|_____|
For the location.html page:
It's time now to go back and open up the site's CSS file. You can do all of this by ONLY editing the CSS file (assuming you followed the directions above).
When choosing a site color theme, pick one that makes sense. For example, a patriotic colored pet shop, or one using bright bold colors (greens and blues, for grass and sky?) makes sense. One using dark dull greys and blood red text would not be a good choice.
Do the items in the order that they are listed.
I've placed some images in this directory. Go ahead and browse them and pick out a few you want to use in your web page. There's no need to copy them to your own directory. Just reference them by specifying the full URL to them (e.g., http://www.cs.pitt.edu/~rmoore/cs134/petshop/2rabbits.jpeg).
Many of them are very large. I've not resized them so that you can be creative and use whatever size you want for your page. So for example, you can do <img src="whatevergoesinhere" alt="whatev" width="200" height="200" />. In a real website, you would resize the images using a photo editor or some such, in order to reduce the download size.
All images are in the public domain.