HTML - Assignment 2
This assignment will help you get some experience with cascading style
sheets, forms, and hands-on HTML coding.
You should a business directory from last class which contains the
components of your website:
- an index.html which should be linked to your home directory
- a page for pricing information
- a page for product information
- a page for ordering
- a page for contact information
- a page with a short bio about the president (you)
- several jpgs for items and a factory.jpg
Your assignment will require you turn in completed versions of those
pages and images, as well as a completed style sheet
business.css
All files must be in your business directory and ready for pickup by
April 2, 2012 at 11:59pm.
===========================================================================
PART 1. Cleaning Up
In the coming sections, you will be creating a unified look for your
website. Before you can do that, the style information put into your
webpages should be removed. This will give you a bit of an opportunity
to do some direct coding with HTML.
1. Go to your business directory and open up index.html in Kompozer.
Click on the Source tab so that you can edit the source directly.
There are several things you need to do to remove the existing
formatting in your webpage. First, look for any tags and
replace them with
tags without any formatting information.
Second look for the tags like
where style information was
added and remove the style information (creating just simple tags).
Do not remove meta information from the header tags, that should
remain. Once you have removed the style information from index.html,
save and close the file.
3. Open up your remaining files for pricing, products, ordering,
contact information, and about the president and remove the style
information from them as well. Make sure you save the files after
removing the style information.
===========================================================================
PART 2. Style Sheets
During this portion of the assignment, you will build a unified look for
your website through the use of style sheets. You have removed the
style from your webpages, now you will add it back in.
1. Open a new document in vi called "business.css". This file will
contain your style sheet information. Stylesheets only contain
definitions, no html tags or comments, so do not add any.
2. You are ready to begin adding style sheet definitions. The first
will be style information for the tags. To do this, you will
need a defintion BODY { }. Define the background-color to be lightblue
and the font-size to be x-large. Remember that declarations need to be
separated by semicolons and that the format of a declaration is
property : value.
5. To see how your style sheet is affecting your webpages, open up
index.html in Kompozer. Select the Source tab. Go the section
between the tags, just after the tags, and add
a link tag. Make sure you set rel, type, and href (you can
make this a relative link). If you cannot recall how to do
this, see the course notes.
Now, when you open your page in a browser, you should see the
style changes appear in your document. Kompozer should also
display the changes, but sometimes requires closing and re-opening
documents to make them display.
6. Go to your remaining webpages and add the tag.
7. Add a definition to the stylesheet for horizontal lines. Make
the height of the lines 5 pixels, the width of the lines 65% of
the screen width, and set the color to cyan. Not all browsers
define color for the lines the same, so you will need to define
both a color and background-color property.
8. Add a definition for H2. Set the color to be white, the
font-family to be Sans Serif, font-size to be xx-large,
font-weight to be bolder and text-transform to uppercase.
9. Add a definition for P. Set the font-style to be italic.
10. Add a defintion for DIV. Make text-align be center.
11. Add a definition for TABLE. Make border be 10 pixels and solid
black. Make the width of the table 100% of the screen width.
Now add a definition for TD. Make its border be 2 pixels and solid
blue. Make text-align center and vertical-align middle.
12. Finally, add a definition for IMG. Make the height and width be
200 pixels.
13. Save and close business.css. You can open a browser and view your
website. Changes should be universal across all your pages, giving
a unified look to your company.
===========================================================================
PART 3. Forms
In this part, you will learn to add forms to your site by fleshing out
your ordering webpage.
1. Open your ordering page in vi.
2. Under the last tag, add some line break tags.
3. Next, add a form tag. You will need to define the properties
action and method within the tag. action should be set to
"ordering.php", which is a script we may begin working on in
class. action tells the browser what to do when form information
is sent. method should be set to GET. This tells the browser
how to send form informtion. Do not forget to create an end
form tag as well.
4. Between your form tags you are going to start defining inputs.
However, to make everything appear nicely, we are going to embed
the inputs into a table. Add the