This assignment tests your understanding of basic HTML and CSS. You will create several files related to a recipe web site for a fictional pie company named Granny’s Pies. Turn in the following files:
index.html,the first of two web pages (with an optional CSS style sheet file); appearance is up to you
pie.html,the second of two web pages; must match a particular specified appearance
recipe.css,the style sheet for pie.html
For full credit, your files must be uploaded to our Webster server and must match the guidelines in this document.
The first part of your task is to create a creative page of your choosing, stored in a file named index.html. Your page must contain at least one link. The file must also be at least 20 lines long and must contain at least 5 different HTML elements in its body. It also may not significantly borrow content from your pie.html. Otherwise, this page can have any appearance you like. If you like, you may use an optional CSS file with this page named index.css and submit it with your other files. Be creative! We may show some students’ pages in class.
Pie Recipe Page:
The second part is to recreate a specific web page of a recipe for lemon meringue pie, stored in a file named pie.html.
Unlike index.html, this page must exactly match the appearance specified in this document.
You must match in appearance the pie web page shown on the next page of this document. The width of the screenshot below is based on a browser window width of 1024px; if your screen is a different size, the width of your page may not exactly match. (Firefox’s Web Developer Toolbar add-on can help you resize your browser to any dimension; you could use 1024×768 to compare the images.) Any line breaks shown are done automatically by the browser, except ones that are clearly much narrower than the page width, such as the line “One 9-inch pie”:
Provided Output Text:
You don’t need to type in all of the text of the pie web page, only the HTML tags. There is a provided text file on the course web site that you can copy and paste into your text editor to get started. Then you can add the appropriate HTML tags to the file and save it as your .html page.
Appearance and Behavior Details:
The pie web page’s title text should be Grandma’s Lemon Meringue Pie .
All headings on the page should use a foreground color of #A4A400 (red=164, green=164, blue=0) and a background color of #F0F0F0 (red=240, green=240, blue=240). The font families for headings are: Lucida Sans Unicode, Helvetica, Arial, or any sans-serif font available on the system (in that order). The page’s main heading is aligned to the center of the page body, and uses a 22pt bold font. Other headings on the page are left-aligned and appear in an 18pt normal font. All headings should be underlined.
The overall page’s body should have a white background. Text in the body should have a foreground color of #404040 (red=64, green=64, blue=64) and use an 11pt font. The font families for page text are Georgia, Garamond, or any serif font available on the system. Any links on the page should use the color #A4A400 (red=164, green=164, blue=0), matching the color of the page headings.
In the Ingredients list, the underlined words “tbsp” and “tsp” are abbreviations for “tablespoons” and “teaspoon” respectively. When the user hovers the mouse over these abbreviations, the full word should appear as a tooltip.
At the end of the Directions, the deleted word “cake” with a strike-out line through it is replaced by the word “pie”.
After the Links section there is a short copyright notice that appears as a section of pre-formatted text in a monospace font. The text is spaced such that the second line is indented by 2 spaces and the third line by 4 spaces.
The names of the four major steps of the recipe directions (such as “Preheat Oven”) are strongly emphasized. The quotations from the users appear in an italic font as indented blocks with background color #FFFFA8 (red=255, green=255, blue=168). Some words in the last quote are bolded for emphasis.
The picture of the pie and the W3C validator images at the bottom come from the following images, respectively. All images are located at the base URL of https://webster.cs.washington.edu/images/ . Use an absolute URL to link to each image; don’t link to a relative URL on your hard drive.
The page bottom has four links. The “Home” link should go to your index.html page. Use a relative URL and assume it is located on the same site and directory as pie.html. The “Search for other lemon meringue pie recipes” text, “W3C HTML5” button, and “W3C CSS” button should link to the following web pages, respectively:
(this is our custom W3C
(this is our custom W3C
All other decisions about styling on the page are left to the web browser. Any styles mentioned previously that are the same as browser defaults do not have to be explicitly included in your CSS style sheet. The screenshot in this document was taken on Windows using Firefox, which may differ from the appearance on your system.
In addition to the previous required features, you must also complete at least two (2) of the following additional requirements in your pie page. These are features that may have not been covered in detail in lecture; you will have to explore your resources such as your textbook, lecture slides, or online references to learn how to complete these features. If you want to complete more than two of the extra features below, that is fine, but only two are required.
Background: Set the overall page to use a background image of: (use absolute URLs to link to all images) https://webster.cs.washington.edu/images/silverware.jpg
The image should repeat in both directions across the page and should not move in relation to the browser window when the page is scrolled.
Favicon: Set the page to have a “favorites icon” (“favicon”). Use absolute URLs to link to all images. Use: https://webster.cs.washington.edu/images/pie-icon.gif
Favicons are explained in Chapter 3. The icon may not work in Internet Explorer; you may ignore this.
Pie bullet: Set all bulleted lists of items on the page to use an image for their bullet icon rather than the normal black circle. Use the following image (use absolute URLs to link to all images): https://webster.cs.washington.edu/images/pie-icon.gif
Wide headings: Place 0.25em horizontal spacing between neighboring letters in all headings on the page.
Tight heading background: Make it so that the gray background behind the headings on the page is only behind the text itself, not stretched across the entire width of the page. (Looks nice with extra feature #1.)
Other: Do you have an extra feature you’d like to add to your page that isn’t listed here? Ask us on the course message board and we’ll let you know if it is okay to substitute for one of the above.
Near the top of your HTML file, put a comment saying which extra features you have completed.
As much as possible, you should implement these changes by modifying your CSS code rather than your HTML. Some of the CSS properties necessary will not have been covered in class, so you must learn them yourself. Try using the textbook or Google. There are some good HTML and CSS references such as the following sites:
For full credit, your HTML and CSS should follow the rules listed in the Style Guide on the class web site. Choose appropriate HTML tags to match the structure of the content on the page. Do not express style information in HTML with inline styles or presentational tags such as b or font. Do not use any HTML tables in your pie.html.
Your pie.html page must also pass the W3C HTML5 validator with no errors (a green bar). (Your page is fine as long as you see the green bar and text “This document was successfully checked as HTML5!”) We will click your W3C validation buttons to validate your page, so test them for validity by clicking those same buttons.
You only need to worry about your page’s appearance in standards-compliant browsers such as Firefox or Chrome.
You will not be tested in Microsoft Internet Explorer or other browsers that do not comply to web standards.
Express all stylistic information on the page using CSS defined in recipe.css. For full credit, your style sheet must successfully pass the W3C CSS validator. Part of your grade comes from expressing your CSS concisely and without unnecessary or redundant styles. For example, if the page uses the same color or font family for multiple elements on the page, you must group those elements into a single CSS rule, so that it would be possible to change the page’s color/font by modifying a single place in the CSS file. Outside of extra features, do not use HTML or CSS constructs that have not been discussed in lecture or the slides, through Chapters 2-3 of the textbook.
Though they will not be discussed until after the homework is assigned, you may know about using HTML class and id attributes to target elements for styling. Do not overuse such attributes in your HTML unnecessarily. If there is already a suitable tag for representing a given piece of content, favor the use of that tag rather than a less appropriate tag with a class or id attached for styling purposes.
Format your HTML and CSS nicely so that it is as readable as possible, similarly to the examples shown in class. Also place a comment header in each file containing your name and section and a brief description of the assignment and the file’s contents. You must properly use whitespace and indent your HTML and CSS code following examples shown in class. To keep line lengths manageable, do not place more than one block element on the same line or begin any block element past the 100th character on a line. For reference, our solution has 135 lines of HTML and 45 lines of CSS, though you do not need to match this exactly.
The majority of the points will be for pie.html and recipe.css. The index.html will also be graded, but it will be worth few points. The main style constraint on index.html is that it should pass the W3C HTML5 and CSS validators. Beyond that it can contain any non-obscene content you like, even using material we have not yet learned in lecture. Please do not link to external resources (other than image files or CSS) from your index.html page. If your index.html links to any images, please download those images and upload them to your Webster space and point your page to the image URLs on Webster; this will help to avoid broken image links when grading.
Submit your assignment online from the turn-in link in the Homework section of the course web site. Turn in both
.html files and your .css style sheets. You do not need to turn in the provided images. If your index.html page includes images linked using absolute URLs, you do not need to turn in those images.
Part of your grade will also come from successfully uploading your files to the Webster web server. You should place your files into your public web space in a subdirectory named hw1, so that it is possible to navigate to your page by entering the following URL into the browser:
For example, if your UW NetID is johndoe, your page should be available at the following URL:
If your page is not available at exactly this URL (case-sensitive), you may not receive credit for this part of the assignment. Please note that uploading your files to Webster, while part of your grade, is NOT the way to turn in your program; turn in your program through the turnin link on the course web site as stated previously. Students who upload files to Webster but do not turn them in may not receive full credit for their work.
Please do not place a solution to this assignment online on a publicly accessible web site, neither during nor after the school quarter is over. Doing so is considered a violation of our course academic integrity policy.
Copyright © Marty Stepp / Jessica Miller, licensed under Creative Commons Attribution 2.5 License. All rights reserved.