IT350 - Web and Internet Programming

Lab 03 Bring on the Style

Introduction

Web sites are meant to provide information, promote something, and/or attract users. Up till now, we have looked mostly at the structure of web pages. Now we will look at formatting an important additional aspect of good web site design. The techniques used in XHTML 1.1 are cascading style sheets (CSS). For this lab, dress up your site using CSS.

Part of the role of web author is to be creative, using the available tools. Again, this lab will be building on the pages you created last week. Therefore, it is highly recommended that you use a copy of the pages you created last week as the basis for this lab. At a minimum your Unit Home Page, event schedule and form from the previous labs are required and shall be adapted to CSS. In addition, your pages should convey a set purpose, be organized in such a way that it promotes that purpose, and be visually appealing.

Since the focus in this lab is on appearance, a larger than usual portion of your grade will depend upon aesthetics.

Lab Requirements

You must create a folder on your Web drive called "Lab03" (without the quotes) and store your work in that directory. (You are highly encouraged to copy your lab from last week into this directory and make changes to it there!).

1.      New style sheet: Create an external style sheet to contain a core set of styles used in all pages within this labs site. The name of the style sheet must be styles.css (without the quotes). At a minimum, define the following attributes in some element:

      text-decoration

      text-align

      background-color

      font-weight

      color

      margin-xxx (left, right, top, or bottom)

      border-style or color or width

2.      Existing HTML pages: modify all of your existing XHTML pages (that you have copied into the Lab03 directory) to link to the style sheet you created above. Then make any additional changes to each page so that the overall appearance is noticeably different now that the stylesheet has been added (hint: you dont necessarily have to modify the body of your page to achieve this, though it is fine to do so). Try to make use of CSS to make your pages more attractive and more functional.

3.      New HTML page: Create a new page, detail.html, that provides details about a specific fictitious event in your schedule. Ensure the page links to your schedule and provide a link from the schedule to the new page.

      Define at least two classes and apply styling using those classes

      Use span and div attributes in styling

      Use a floating technique to put an image on the right side of a page and have text to the left

      Use at least 3 forms of inline styling.

      Use the meta element to describe your new page.

4.      Validation:Validate all of your XHTML files and your CSS file using the appropriate W3C validator.

 

Your web page must be constructed using Notepad or a similar text-only editor. The use of programs such as Microsoft Word, Microsoft Frontpage, DreamWeaver, ColdFusion, Mozilla Composer, etc. will be considered an honor offense.

Extra Credit

For a nominal amount of extra credit do some/all of the following:

  1. Modify a list that you have somewhere to use an appropriate image instead of the default circle/square for the bullet next to each list item, then make the image change to some other image when the user positions the mouse over that element.
  2. Find an example of some bad use of CSS on the web where parts of the page are unreadable, confusing, cluttered, or just plain ugly. Add a link to this page to your default.htm page. Then, make a copy of the page (in your Lab03 directory) and modify it to improve its appearance by only changing CSS elements (whether inline, embedded, or external make a copy of the external style sheet and modify that if appropriate). Add a link to your improved page from your default.htm page, and next to this link include a brief description of what you changed.

Deliverables

  1. Your main web page should be called "index.html" (without the quotes).
  2. Your pages should contain all of the elements described in the requirements section above.
  3. All of your files should be in a folder called "Lab03" (without the quotes) on the Web drive. You are welcome (and highly encouraged) to copy your files from last week's lab into this directory. Your instructor will assume that your web pages are viewable at http://www.mXXXXXX.it.cs.usna.edu/Lab03/index.html where XXXXXX is your alpha number. You may want to check that this URL is viewable and that everything works correctly from a computer where somebody else is logged in. If you've goofed and linked to a file on your X drive, this will help you catch it!
  4. Turn in the following hardcopy at the beginning of class on the due date, stapled together in the following order (coversheet on top):
    1. A completed assignment coversheet. Your comments will help us improve the course.
    2. The first page of the output of the W3C HTML validator, as run on the final version of your Lab03/detail.html. This should show that your document correctly validated, but turn it in anyway if you cant get your page to validate. If the W3C validator is not working when you need it, you may substitute results from http://www.validome.org/ instead. Note: even though you are turning in validation results for only some of your pages, all pages are required to validate correctly.
    3. First page of the output of the CSS validator, as run on your final Lab03/styles.css file. This is a different validator, see http://jigsaw.w3.org/css-validator/
    4. A printout of the source to your Lab03/detail.html file (not the rendered page that you normally see with Internet Explorer).
    5. A printout of the source to your Lab03/styles.css.

When finished, the structure of your web site should look like this: (items in blue shall undergo creation/modification during this lab)

www.m0XXXXX.it.cs.usna.edu/

default.htm (main page for the course; has links to each weeks lab)

Lab01/

index.html

Lab02/

index.html

schedule.html

form.html

Lab03/

index.html (modify to use CSS)

schedule.html (modify to use CSS

form.html (modify to use CSS if you had this page from Lab 02)

detail.html (new page with details on one of your events and additional CSS styling)

styles.css (new stylesheet)