HOMEWORK 3 Due date: January 27, 2006, 23:59:59 Document status: FINAL A. XHTML/CSS 1. Style Sheets: Text formatting (40 pts.) The first part of the assignment is to format the 'story' assigned in hw1, part 2, with an external style sheet in XHTML 1.0 Strict. Copy the story page you created in hw1 into your hw3 directory and remove ALL presentational and deprecated formatting markup. Set the document type to XHTML 1.0 Strict and declare the character set by changing/adding following information to the extracted HTML page at the appropriate places: Also, add a link to the style sheet you are going to create. Then write the style sheet. The style sheet does not need to be extensive but must control: fonts text/image alignment (images may not bounce against text; you are free to move images) page margin 2. Style Sheets: Division-based page layout (40 pts.) Using the same layout structure as in the table-based design of hw2, create a design by using
are allowed, but without properties. 2. Both the HMTL (XHTML 1.0 Strict) and CSS pages must validate without errors at: http://validator.w3.org/ http://jigsaw.w3.org/css-validator/ 3. The designs must closely match when viewed through the Mozilla/Firefox and Internet Explorer browsers installed on the Mac OSX computers in the MacLab, or equivalently different browsers on the other platforms. (There may be small differences, but over-all appearance, colors, alignment, borders, etc. must be the same.) The designs must hold up to window-resizing, that is, the alignment of text and images should reasonably remain the same in a narrow or wide window. 3. All pages must look 'well' when viewed through a text browser like 'lynx' or 'links'. (The layout should arrange images in such a manner that they are distinguishable from text when viewed in a text browser.) B. PROGRAMMING 3. Input checking (20 pts) Your are given a Perl script that accepts input from the command line. Your assignment is to extend the script and test if the input meets certain conditions. When it does, your code has to result in some kind of action, as specified below. First, pick a number from 1 to 5. This is your 'magic number'. Here are the three conditions and the expected result: 1. The command line input is 'q' (lower case letter q): Result: Your program must terminate ('q' stands for 'quit'). The statement that terminates a script in Perl is exit(0); 2. The input is your 'magic number': Result: Your code must print a message to screen that informs the users that they have entered the correct number. 3. The input is neither of the above: Result: Your code must print a message to screen that informing the users that the input was incorrect. Save the script in your hw3 directory under the name second_script.pl and make it executable. # ------------------------------------------------------------------ # The script can be downloaded from the course schedule page: http://www.classes.cs.uchicago.edu/archive/2006/winter/10100-1/html/hwks/hw3/second_script.tar Move the script file into your hw3 directory. To extract the perl file, type tar xf second_script.tar # ------------------------------------------------------------------ # FINALLY: Create links to all HTML and CSS files you created in directory hw3.