HTML/JS

Items 1 to 10 of 69 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Ascending Direction
  1. New Perspectives HTML5 and CSS3 7th Edition Tutorial 10 Case 1 Trophy Case Sports tc_order

    New Perspectives HTML5 and CSS3 7th Edition Tutorial 10 Case 1 Trophy Case Sports

    Regular Price: $20.00

    Special Price: $15.00

    New Perspectives HTML5 and CSS3 7th Edition Tutorial 10 Case 1 Trophy Case Sports


    Trophy Case Sports Sarah Nordheim manages the website for Trophy Case Sports, a sports memorabilia store located in Beavercreek, Ohio. She has asked you to work on creating a script for a shopping cart page. The script should take information on the items that the customer has purchased and present in it table form, calculating the total cost of the order. A preview of the page you will create is shown in Figure 10-35.


    Sarah has already designed the page layout. Your job will be to use JavaScript to enter the order information (this task will later be handled by a script running on website) and to write a script that generates the HTML code for the shopping cart table.


    Complete the following:
    1. Use your editor to open the tc_cart_txt.html, tc_cart_txt.js and tc_order_txt.js files from the htm10 case 1 folder. Enter your name and the date in the comment section of each file, and save them as tc_cart.html, tc_cart.js and tc_order.js respectively.


    2. Go to the tc_cart.html file in your editor. Directly above the closing </head> tag, insert script elements to link the page to the tc_order.js and tc_cart.js files in that order. Defer the loading and running of both script files until after the page has loaded.


    3. Scroll down the file and directly below the h1 heading titled "Shopping Cart" insert a div element with the ID cart.


    4. Save your changes to the file and go to the tc_ordet.js file in your editor.


    5. Within the tc_order.js file, you will create arrays containing information on a sample customer order. Create an array named item that will contain the ID numbers of the items purchased by the customer. Add the following four item numbers to the array: 10582, 23015, 41807, and 10041.


    6. Create an array named itemDescription containing the following item descriptions:
    • 1975 Green Bay Packers Football (signed), Item 10582
    • Tom Land, 1955 Football Card (unsigned), Item 23015
    • 1916 Army-Navy Game, Framed Photo (signed), Item 41807
    • Protective Card Sheets, Rem 10041


    7. Create an array named itemPrice containing the following item prices: 149.93, 89.98, 334.93, and 22.67.


    8. Create an array named itemQty containing the following quantities that the customer ordered of each item: 1, 1, 1, and 4.


    9. Save your changes to the file, and then open the tc_cart.js file in your editor.


    10. In your script, you will calculate a running total of the cost of the order. Declare a variable named orderTotal and set its initial value to 0.


    11. Declare a variable named cartHTML that will contain the HTML code for the contents of the shopping cart, which will be displayed as a table. Set its initial value to the text string:
    <table>
    <tr>
    <th>Item</th><th>Description</th><th>Price</th><th>Qty</th><th>Total</th>
    </tr>


    12. Create a for loop that loops through the entries in the item array. Each time through the loop, execute the commands described in Steps a through e.
    a. Add the following HTML code to the value of the cartHTML variable
    <tr> <td><img src='tc_item.png' alt='item' /> </td>
    where item is the current value from the item array.
    b. Add the following HTML code to the cartHTML variable to display the description, price, and quantity ordered of the item
    <td> description</td> <td>price</td> <td>quantity</td>
    where description is the current value from the itemDescription array, price is the current value from the itemPrice array preceded by a $ symbol, and quantity is from the itemQty array.
    c. Declare a variable named itemCost equal to the price value multiplied by the quantity value for the current item.
    d. Add the following HTML code to the cartHTML variable to display the cost for the item(s) ordered, completing the table row
    <td>$cost</td></tr>
    where cost is the value of the itemCost variable, preceded by a $ symbol.
    e. Add the value of the itemCost variable to the order Total variable to keep a running total of the total cost of the customer order.


    13. After the tor loop has completed, add the following HTML code to the value of the cartHTML variable, completing the shopping cart table
    <tr>
    <td colspan= '4'>Subtotal</td>
    <td>Total</td>
    </tr>
    </table>
    where total is the value of the orderTotal variable, preceded by a $ symbol.


    14. Apply the cartHTML value to the inner HTML of the div element with the ID cart.


    15. Document your script file with appropriate comments, and then save your work.


    16. Open the tc_cart.html file in your browser and verify that the page now shows the shopping cart data for the sample customer order.

    Learn More
  2. New Perspectives on HTML, CSS, and Dynamic HTML 5th edition Tutorial 8 Case 1 dessertWeb

    New Perspectives on HTML, CSS, and Dynamic HTML 5th edition Tutorial 8 Case 1 dessertWeb

    Regular Price: $15.00

    Special Price: $12.00

    New Perspectives on HTML, CSS, and Dynamic HTML 5th edition Tutorial 8 Case 1 dessertWeb


    dessertWeb Amy Wu has asked for your help in redesigning her Web site, dessertWeb, taking advantage of some of the new CSS3 styles. The dessertWeb Web site is a cooking site for people who want to share dessert recipes and learn about cooking in general. In addition to redesigning the site’s appearance, she wants you to create a print style sheet so that users can easily print out recipes and ingredient lists without having to print the headers, footers, and navigation lists that appear on each Web page. Figure 8-64 shows a preview of the screen version of the page.


    Complete the following:
    1. In your text editor, open the recipetxt.htm and dweffectstxt.css files from the tutorial.08\case1 folder included with your Data Files. Enter your name and the date in the comment section of each file. Save the files as recipe.htm and dweffects.css, respectively.
    2. Go to the dweffects.css file in your text editor. Create a style rule for the body element to add two box shadows. One shadow should be placed on the right edge of the page body with the color value (211, 211, 211) and an opacity of 0.5. Set the horizontal offset to 10 pixels, the vertical offset to 0 pixels, and the blur to 15 pixels. Create the same drop shadow on the left edge of the page body as well.
    3. Apply the following style rules to each list item in the horizontal navigation list of the page header: a) set the background color to the value (224, 238, 238); b) add rounded corners 10 pixels in radius; and c) create two inset box shadows: one white shadow located in the upper-left corner offset 3 pixels in the horizontal and vertical direction with a blur of 2 pixels, and the other, a shadow in the lower-right corner with a color value of (147, 207, 207) offset 5 pixels in the horizontal and vertical direction with a blur of 5 pixels.
    4. Add box shadows to the article element with the following properties: a) create an inset box shadow in the lower-right corner with a color value of (171, 171, 171), offset 15 pixels in the horizontal and vertical direction, and with a blur of 75 pixels; and b) create an external shadow located in the lower-right corner with a color value of (101, 101, 101), offset 5 pixels in the vertical and horizontal direction with a blur of 5 pixels.
    5. Add a horizontal background gradient to the blockquote element with the following properties: a) set the gradient to go from the left to the right starting with the color value (166, 230, 230), having a color stop at the 5% point with a value (231, 231, 231), and ending with the color value (255, 255, 255) 15% of the way across the block quote; b) create the same color gradient using the WebKit gradient() function with a color stop for the middle color occurring at the 33% point; and c) using the Internet Explorer Gradient filter, create a horizontal gradient that starts with the hexadecimal color value DEF4F4 and ends with the value FFFFFF.
    6. Save your changes to the file, and then return to the recipe.htm file in your text editor. Add a link to the dweffects.css style sheet file. Specify that the dwlayout.css and dweffects.css style sheets should be used with screen devices.
    7. Save your changes to the document, and then view the page in your Web browser. Verify that the appearance of the page resembles that shown in Figure 8-64. (Note: If you are using Internet Explorer version 8 or earlier, your page will show only the gradient effect around the block quotes, and the gradient will go from light teal to white.)
    8. Figure 8-65 shows a preview of the printed version of the recipe page, displaying the recipe description and ingredients on the first page and the directions on the second page. In your text editor, open the dwprinttxt.css file from the tutorial.08/case1 folder. Enter your name and the date in the comment section of the file, and then save it as dwprint.css.
    9. Set the page size of the printout to 8.5 3 11 inches in portrait orientation with a margin of 0.5 inch.
    10. Hide the following page elements on the printout: page header, left section, right section, all navigation lists, the aside element, the page footer, the h2 element nested within a heading group, and the last paragraph in the article element.
    11. Set the font size of all h1 headings to 200% with a bottom margin of 0.2 inches. Set the font size of all h2 elements to 150% with a top margin of 0.5 inches.
    12. Set the line height of all list items to 1.5 em.
    13. Set the left margin of all ordered lists to 0.5 inches, displaying a decimal value.
    14. Set a page break to always occur before the last h2 element in the page.
    15. Save your changes to the file, and then return to the recipe.htm file in your text editor. Add a link to the dwprint.css style sheet file, setting the style sheet to be used with a print device.
    16. Save your changes to the document, and then view the printed version of the file or preview the printed version in your Web browser. Verify that the contents and layout resemble that shown in Figure 8-65.
    17. Submit your completed files to your instructor.

    Learn More
  3. New Perspectives on HTML, CSS, and Dynamic HTML 5th edition Tutorial 6 Case 1

    New Perspectives on HTML, CSS, and Dynamic HTML 5th edition Tutorial 6 Case 1 Sblogger

    Regular Price: $15.00

    Special Price: $12.00

    New Perspectives on HTML, CSS, and Dynamic HTML 5th edition Tutorial 6 Case 1


    Sblogger Sports enthusiast Steve Lavent is working on a Web site called Sblogger that will contain articles and commentary on the world of sports. He's asked for your help in designing the page on which users can submit their own comments on the articles that Steve posts to his blog. Your job will be to create a prototype for the commentary form, and to include HTML code and CSS styles to help validate user input. A preview of the Web form you'll create is shown in Figure 6-78.


    Complete the following:
    1. In your text editor, open the sblogtxt.htm and commtxt.css files from the tutorial.06\case1 folder included with your Data Files. Enter your name and the date in the comment section of the file. Save the files as sblogger.htm and comments.css, respectively.
    2. Go to the sblogger.htm file in your text editor and review the contents and structure of the document. Link the file to the comments.css style sheet.
    3. Scroll down to the h2 heading title Post Your Comments, and directly below this heading insert a form element with the action www.sblogger/cgi-bin/subcomments using the post method.
    4. Within the form element, create a field set with the name and id commentFS.
    5. Create a label element with the text Username. Within the label element, insert an input box for the username field. Make the field required and add the title Supply your username.
    6. Create a label element with the text E-mail. Within the label element, insert an input box for the email field. Set the data type to email and make the field required. Add the title Supply a valid e-mail address.
    7. Create a label element with the text Password containing an input box for the password field. Set the data type to password and make the field required. Add the title You must provide your password.
    8. Create a label element with the text Comment (500 character limit), placing the parenthetical text on a new line, and within the label element insert a text area box for the commentBox field. Limit the number of characters that can be typed into the text area box to 500 characters.
    9. Add a submit button with the text Submit Comment.
    10. Save your changes to the file and then go to the comments.css file in your text editor. Create style rules for the styles described in the following steps.
    11. Display the field set with a background color of (245, 245, 255). Set the top and bottom margins to 15 pixels and the left and right margins to auto. Add 5 pixels of padding and set the width of the field set to 90%.
    12. Display labels as blocks floated on the left once the left margin is clear of elements. Set the font size to 0.9 em and the width to 100%. Set the top and bottom margins to 5 pixels.
    13. Display input boxes and text area boxes as blocks floated on the right margin. Set the font size to 0.9 em and the width to 55%. Set the left and right margins to 10 pixels. In addition, set the height of text area boxes to 150 pixels.
    14. Display the submit button as a block once both margins are clear. Do not float the submit button. Set the dimensions of the button to 200 pixels wide by 30 pixels high.Set the top and bottom margins to 5 pixels, and the left and right margins to auto.
    15. When input boxes and text area boxes receive the focus, change the background color to the value (225, 225, 240).
    16. When input boxes receive the focus and are valid, change the background color to (225, 240, 225) and display the background image go.png in the bottom-right corner of the box with no tiling. Resize the background image so that it is contained within the input box.
    17. When input boxes receive the focus and are invalid, change the background color to (240, 225, 225) and display the background image stop.png in the bottom-right corner of the box with no tiling. Resize the background image so that it's contained within the input box.
    18. Close the style sheet file, saving your changes.
    19. Open sblogger.htm in your Web browser and test the form. Verify that you cannot leave the username, email, and password fields blank and still submit the form. Also verify that the form is rejected if an invalid e-mail address is submitted in the email field.
    20. If you have access to the Google Chrome browser, test the Web page in that browser and verify that the title text you entered for the input boxes in Steps 5 through 7 is included in the error box supplied by the browser when those input boxes fail the validation test.
    21. Submit your completed files to your instructor, in either printed or electronic form, as requested.

    Learn More
  4. New Perspectives on HTML, XHTML, and Dynamic HTML Chapter 6 Case Problem 2 Civil War Studies

    New Perspectives on HTML, XHTML, and Dynamic HTML Chapter 6 Case Problem 2 Civil War Studies

    Regular Price: $15.00

    Special Price: $12.00

    New Perspectives on HTML, XHTML, and Dynamic HTML Chapter 6 Case Problem 2 Civil War Studies


    Civil War Studies Adanya Lynne, a professor of military history at Ridgeview State College in Bartlett, Tennessee, has been preparing a series of online quizzes for her students. She has created the basicWeb page design and layout, but has come to you for help in designing the quiz form. She envisions a series of multiple choice questions displayed in a collection of option buttons. Students will be able to click answers on the form and then submit their answers to a CGI script running on theWeb server for their scores. Figure 6-61 shows a preview of the page you’ll create for Professor Lynne.


    Complete the following:
    1. Use your text editor to open the cwquiztxt.htm and qformtxt.css files from the tutorial.06\case2 folder included with your Data Files. Enter your name and the date in the comment section of each file. Save the files as cwquiz.htm and qform.css, respectively.
    2. Go to the cwquiz.htm file in your text editor and insert a link to the qform.css style sheet.
    3. Scroll down the file to the rightColumn div element. Professor Lynne has inserted the 10 questions for the online quiz. Enclose the questions in a form element with the id quizForm. Call the CGI script at http://www.ridgeviewcollmil.edu/quiz using the post method.
    4. Go to the first question and enclose the text of the question in a div element with the class name question.
    5. Enclose the set of answers for the first question within a field set.
    6. Place a label element around each possible answer for the first question. Put the first answer in the class answerA, the second answer in the class answerB, the third answer in the class answerC, and the fourth answer in the class answerD.
    7. Within each of the four labels for the answers to the first question, insert an option button directly before the text of the answer. Assign the ids ans1a, ans1b, ans1c, and ans1d to the four option buttons. Assign the field name question1 to each of the four option buttons. Finally, set the values for the four option buttons to a, b, c, and d.
    8. Associate each of the four labels with a different id. Associate the first label with the ans1a field, the second with ans1b, the third with ans1c, and the fourth with ans1d.
    9. Repeat Steps 4 through 8 for the remaining nine questions in the quiz, with the following changes:
    - Change the ids for the four option buttons to the question number. For example, the ids for the second question are: ans2a, ans2b, ans2c, and ans2d.
    - Change the field name of the four option buttons to the number of the question. For example, the field name for the second question is question2, for the third question is question3, and so forth.
    10. After the last question, insert a div element with the id buttons. Within the element, insert a submit button with the value Submit, a command button with the value Answers, and a reset button with the value Reset.
    11. Save your changes to the file.
    12. Go to the qform.css file in your text editor and add the following styles to the style sheet:
    - Float all elements of the question class on the left margin. Set their widths to 200 pixels and right-align the text. Set the clear style to left so that the element is only displayed when the left margin is clear.
    - Display all field sets as block-level elements floated on the left margin. Set the size of the field sets to 400 pixels wide by 50 pixels high. Add a 20-pixel left margin and a 5-pixel bottom margin. Set the position property to relative. Finally, display the tan.jpg file as the background image for the field sets.
    - Use absolute positioning to place all elements of the answerA class at the coordinates (0, 0), place answerB class elements at the coordinates (200, 0), place answerC class elements at (0, 25), and place answerD class elements at (200, 25).
    - Center the contents of the div element with the buttons id. Set the width to 600 pixels and the top/bottom padding to 10 pixels. Set the left/right padding to 0 pixels.
    - For input elements within the buttons div element, set the width to 100 pixels, set the top/bottom margin to 0 pixels, and set the left/right margin to 10 pixels.
    13. Save your changes to the file and open cwquiz.htm in your Web browser. Verify that the layout and design resemble that shown in Figure 6-61.
    14. Submit your completed files to your instructor.

    Learn More
  5. CIS 273 Techincal Project Business Website

    CIS 273 Techincal Project Business Website

    Regular Price: $25.00

    Special Price: $20.00

    CIS 273 Lab Assignment 10 Business Website


    This assignment consists of three (3) sections: a narrative, a storyboard, and a business Website. You must submit all three (3) sections for the completion of this assignment. The assignment is to be submitted in a single compressed folder (zip file) to the online course shell. Section 3 must contain all .htm files, along with any other files that may be necessary for your project to run (ex: text files, images, etc.). When saving the compressed folder (zip file), it should be saved as Techincal Project_Last name_First initial.zip. For example, if your name is Mary Smith, the file for submission should be saved as Techincal Project_Smith_M.htm
    Select a business that you are interested in. (e.g., pet store, travel site, fishing gear, appliances, automobiles, housewares, furniture, etc.). Imagine that you have just been hired to create a four (4) page hierarchical Website for the business you selected.


    Section 1: Narrative
    Write a half (1/2) page paper in which you:
    1. Create a narrative that describes the site to your prospective client.


    Section 2: Storyboard
    Imagine that your narrative has been approved. Use Word, Visio, or Dia to:
    2. Create a storyboard diagram depicting the layout of your Website.


    Section 3: Business Website
    In order to receive full credit for this section, you will need to submit:
    1) One (1) screen shot of your emailed data from the guestbook.
    2) One (1) CSS style sheet.
    3) Four (4) Web pages.


    3. Create your Website based on the following requirements:
    a. Create a Cascading Style Sheet (.css) for all pages, which:
    i. Applies a background color.
    ii. Applies style to font.
    iii. Changes the ordered list markers to anything other than the default.
    iv. Changes the unordered list markers to anything other than the default.
    v. Applies style to a copyright footer.


    b. Include:
    i. A graphic or logo on the home page.
    ii. A navigation bar with links to every other page on the home page.
    iii. A guestbook registry on the home page using the mailto: tag with an entry field for:
    a. A person’s name.
    b. An email address.
    iv. A piece of JavaScript on the home page.


    c. Create a submit button for the guestbook registry that will email the information to your email address. Note: Test the function and take a screen shot of the emailed information you receive. You must submit the screen shot in your zipped file of deliverables as proof.


    d. Create three (3) sub pages that include:
    i. The same graphic / logo.
    ii. A navigation bar with links to every other page.
    iii. An ordered list of at least two (2) items, and then at least two (2) unordered list entries under each ordered list item where one (1) of the items must be a hyperlinked to a Website (the hyperlink should not show the address printed on the page).
    Note: Each of the three pages should have unique lists.
    Example:
    A. Food
    ? Dry food
    ? Wet food
    ? Canned food
    B. Toys
    ? Indoor
    ? Outdoor


    The specific course learning outcomes associated with this assignment are:
    1) Describe the structure of the World Wide Web as interconnected hypertext documents.
    2) Create and validate HTML documents.
    3) Create presentations using Cascading Style Sheets and DHTML.
    4) Write clearly and concisely about Web design and development using proper writing mechanics and technical style conventions.

    Learn More
  6. Penn foster Graded Project 41885200 Teenage Mutant Ninja Turtles

    Penn foster Graded Project 41885200 Teenage Mutant Ninja Turtles

    Regular Price: $20.00

    Special Price: $15.00

    Penn foster Graded Project 41885200 Teenage Mutant Ninja Turtles


    Turn to page 321 of the textbook and use the Practice Creating iFrames exercise to create a page listing the Teenage Mutant Ninja Turtles. You’ll need to modify the music types pages created earlier in your reading of the chapter to reflect the new focus of the pages. Use CSS formatting to change the color of each turtle’s name in the frame to the color of the headband each one wears. After completing the pages, validate the code using the XHTML validator at http://validator.w3.org/.

    Learn More
  7. Penn foster Graded Project 41885100 Body Systems

    Penn foster Graded Project 41885100 WEB PAGES LISTS AND TABLES

    Regular Price: $20.00

    Special Price: $15.00

    Penn foster Graded Project 41885100 WEB PAGES LISTS AND TABLES


    Body Systems is one of the leading manufacturers of home gyms. The company recently hired you to assist in developing their web site. Your first task is to create a Web page for the LSM400, a popular weight machine sold by the company.
    You'll download three files from your My Courses page:
    1. smith.txt, describing the features of the LSM400
    2. image file, logo.jpg, displaying the company logo
    3. smith.jpg, an image of the LSM400
    You can supplement these files with any other resources available to you. You're responsible for the page's content and appearance.
    To complete this task:
    1. Create an XHTML file named smith.htm.
    2. In the head element, include an appropriate page title, along with a comment describing the purpose of the page, your name, and the date.
    3. Include at least one example of each of the following in the document:
    a. Heading
    b. Paragraph
    c. Ordered or unordered list
    d. Character formatting element
    e. Inline image
    f. Horizontal line
    g. Special character
    h. Block-level element that is not a heading, paragraph, list, or horizontal line
    4. Demonstrate your understanding of inline styles by including at least two different examples of an inline style.
    5. Use proper XHTML syntax at all times. Close all two sided tags. Properly nest all tags. Use lowercase element and attribute names. Enclose attribute values in quotes. Include alternate text for non-graphical browsers with inline images.
    6. Write your code so that it will be easy to read and understand. (You may download two image files from the Internet and use those, citing where you downloaded the files, and create a list of 3 to 5 features at your discretion.)
    7. Save your XHTML file, and then view the resulting Web page in a browser.
    8. Submit your completed project.

    Learn More
  8. New Perspectives on HTML and CSS Edition 6 Tutorial 9 Case Problem 3 Math High

    New Perspectives on HTML and CSS Edition 6 Tutorial 9 Case Problem 3 Math High

    Regular Price: $20.00

    Special Price: $15.00

    New Perspectives on HTML and CSS Edition 6 Tutorial 9 Case Problem 3 Math High


    Math High Professor Laureen Cole of Coastal University, owner of the Web site Math High, has been studying the XML vocabulary MathML and how it can be used to display mathematical equations and information. She's asked you to create an XHTML document that contains elements from both XHTML and MathML. A preview of the page that you'll create is shown in Fig 9-31.


    Complete the following:
    1. Use your text editor to open the quadtxt.xhtml file from the tutorial.09\case3 folder included with your Data Files. Enter your name and the date in the comment section of the file. Save the file as quad.xhtml in the same folder.
    2. Add an XML prolog at the top of the document.
    3. Within the html element, insert two namespace declarations: one for the XHTML namespace and the other for the MathML namespace (http://www.w3.org/1998/Math/MathML). Make XHTML the default namespace for the document and make MathML a local with the prefix m.
    4. Scroll down the document to the paragraph element with the id eq1. Within this paragraph, copy and paste the MathML element from the mathml.txt file for the first equation.
    5. Repeat Step 4 for the paragraphs with ids from eq2 through eq4.
    6. For each MathML element, and the MathML namespace prefix m to indicate that these elements are part of the MathML vocabulary.
    7. Close the file, saving your changes.
    8. Open the quad.xhtml file in a browser that provide built-in support for MathML. At the time of this writing, that includes the FireFox and Opera browsers. Verify that your page resembles that shown in Figure 9-31.
    9. Submit your completed files to your instructor, in either printed or electronic form, as requested.

    Learn More
  9. New Perspectives on HTML and CSS Edition 6 Tutorial 6 Case Problem 2 The Spice Bowl

    New Perspectives on HTML and CSS Edition 6 Tutorial 6 Case Problem 2 Creating a Web Form

    Regular Price: $20.00

    Special Price: $15.00

    New Perspectives on HTML and CSS Edition 6 Tutorial 6 Case Problem 2 Creating a Web Form

    Data Files needed for this Case Problem: diners.png, discover.png, formsubmit.js, go.png, master.png, modernizr-1.5.js, paytxt.css, regex.txt, sb.css, sbback.png, sblogo.png, spicetxt.htm, state.txt, stop.png, visa.png

    The Spice Bowl Rita Sato is the manager of the Web development team for The Spice Bowl, a new online grocery store specializing in gourmet spices. She's asked you to work on the Web forms for the site. The first form you'll create is a payment form in which customers enter their billing address and credit card data. She wants you to include validation tests for customers postal codes, phone numbers, e-mail addresses, and credit card numbers. A preview of the form you'll create is shown in Figure 6-79.

    Complete the following:
    1. In your text editor, open the spicetxt.htm and paytxt.css files from the tutorial.06\case2 folder included with your Data Files. Enter your name and the date in the comment section of each file. Save the files as spice.htm and payment.css respectively.
    2. Go to the spice.htm file in your text editor and review the contents and structure of the document. Link the file to the payment.css style sheet.
    3. Scroll down to the h1 heading Payment Form, and below it insert a form element with the action http://www.thespicebowlcorp.com/cgi-bin/payment using the post method.
    4. Within the form, create three field sets with the ids billing, creditcard, and info, and with the legend text Billing Information (required), Credit Card (required), and Additional Information, respectively.
    5. Within the billing field set, create input boxes for the customer's first name, last name, street address, second line of the street address, and city with the field names fNane, lNane, street, street2, and city, respectively. Add field labels for these input boxes as shown in Figure 6-79.
    6. Create a selection list for the state field containing two-letter abbreviations of the state names. You can find a list of state abbreviations in the state.txt file. Add the label text State.
    7. Create an input box for the zip field along with the label text ZIP/Postal Code. The pattern of the field value should match the regular expression for postal codes. You can use the regular expression patterns listed in the regex.txt data file.
    8. Create an input box for the country field along with the label text Country. Make the default value of the field equal to the text string United States.
    9. Create an input box for the phone field along with the label text Phone. The pattern of the field value should match the regular expression for phone numbers.
    10. All of the fields within the billing field set should be marked as required fields with the exception of the street2 field.
    11. Within the creditcard field set, create a field set belonging to the class optionGroup. Within this field set, create four label elements. Within each label, create an option button belonging to the card field followed by an inline image belonging to one of four credit card companies. The field values associated with the four option buttons are diners, discover, master, and visa, and the inline images are diners.png, discover.png, master.png, and visa.png, respectively.
    12. Directly below the optionGroup field set, create an input box for the ccardnumber field along with the label text Credit Card Number. The text of the field value should match the regular expression for credit card numbers found in the regex.txt file.
    13. Add a label containing the text Expiration Date followed by a selection list for the ccardmonthfield field that contains the first entry --Month-- followed by the text for each individual month in chronological order from January (01) through December (12). Also add a selection list for the ccardyear field with the first entry --Year-- followed by year values for 2014 through 2018.
    14. Add a label containing the text CSC followed by an input box for the csc field. The csc field should be limited to three characters, follow the regular expression pattern \d{3 }$ and display the placeholder text nnn.
    15. Make all of the fields within the creditCard field set required fields.
    16. Within the info field set, create a label containing the text Contact Email followed by an input box for the email field that uses the email data type.
    17. Add a label containing the text Special Notes followed by a text area box for the notes field.
    18. At the bottom or the form, directly above the closing </form> tag, insert a submit button with the button text Submit Order.
    19. Save your changes to the file, and then go to the payment.css file and add styles rules for the different form elements as described in the following steps.
    20. Display all field sets without borders and with a 5-pixel margin. Display all field set legends with a background color of (239, 198, 145) and a text color of black. Set the top and bottom margins to 10 pixels and indent the legend text 20 pixels. Set the width of the legend to 1O0% of the width of the field set. Finally, add rounded borders to the legend, 1 0 pixels in radius.
    21. Display all labels as blocks, floated on the left margin once the left margin is clear. Set the font size to 0.8em and align the label text to the right. Set the top and bottom margins to 2 pixels, and set the left and right margins to 5 pixels. Set the width of the labels to 25%.
    22. Display all input elements as blocks, floated on the left with a font size of 0.9cm and a width of 60%. Set the top and bottom margins to 2 pixels, and set the left and right margins to O pixels.
    23. Display all select elements as blocks floated on the left with a font size of 0.9 em and a margin of 2 pixels.
    24. Display all textarea elements as blocks floated on the left with a font size of 0.9 em, a height of 75 pixels, and a width of 60%.
    25. Set the left margin of the field set belonging to the optionGroup class to 25%. For label elements nested within the optionGroup field set: a) display the labels inline; b) do not float the labels; and c) set the label width to 100 pixels.
    26. Display option buttons inline with no floating. Set the margin of the option buttons to 0 pixels and the width to 20 pixels.
    27. Set the width of the input box for the csc field to 50 pixels.
    28. For the submit button, add the following styles: a) set the background color to the value (239, 198, 145); b) do not float the input box; c) set the dimensions of the button to 150 pixels wide by 30 pixels high; d) set the top and bottom margins to 10 pixels. and set the left and right margins to auto; and e) add a rounded border with a 15-pixel radius.
    29. When input, select, and textarea elements receive the focus, change the background color to the value (255, 218, 165).
    30. When an input element receives the focus and is invalid, change the background color to the value (255, 245, 215) and display the stop.png background image file in the bottom-right corner of the input box with no tiling.
    31. When an input element receives the focus and is valid, change the background color to the value (215, 255, 215) and display the go.png image in the bottom-right corner of the input box with no tiling.
    32. Save your changes to the style sheet.
    33. Open the spice.htm file in your Web browser. Verify that you cannot submit the form without all required fields filled out, and without phone number, e-mail address, and CSC values entered in the proper format.
    34. Verify the validation checks for the credit card number by confirming that the form rejects the following credit card numbers (which are not valid card numbers):
    • 31012345678901
    • 6012123456789019
    • 5912345678901235
    • 8123456789012349
    35. Further verify the validation checks for the credit card number by confirming that the form accepts the following credit card numbers which are valid card numbers:
    • 30312345678901
    • 6011123456789019
    • 5112345678901235
    • 4123456789012349
    36. Submit your completed files to your instructor, in either printed or electronic form, as requested.

    Learn More
  10. New Perspectives on HTML and CSS Edition 6 Tutorial 4 Case Problem 2 Red Ball Pizza

    New Perspectives on HTML and CSS Edition 6 Tutorial 4 Case Problem 2 Creating Page Layouts with CSS

    Regular Price: $20.00

    Special Price: $15.00

    New Perspectives on HTML and CSS Edition 6 Tutorial 4 Case Problem 2 Creating Page Layouts with CSS

    Data Files needed for this Case Problem: modernizr-1.5.js, notice.png, pizzatxt.c, rblogo.png, redhalltxt.htm, redbar.png, slice.png, toppings.png
    Red Ball Pizza Alice Nichols is the owner of Red Ball Pizza, a well-established pizzeria in Ormond Beach, Florida. She's asked for your help in creating a design for the company's Website. After discussing the issue with Alice, you settle on a fixed width layout. Alice has created a sample home page for you to work on. She already created all of the content and the graphics. She needs your help with the design. Figure 4-79 shows a preview of the page you'll create for her.

    Complete the following:
    1. In your text editor, open the pizzatxt.css and redballtxt.htm files from the tutorial.04\case2 folder. Enter your name and the date in the comment section of each file. Save the files as pizza.css and rcdhall.htm, respectively.
    2. Return to the redball.htm file in your text editor. Take some time to review the content and structure of the document, and then link the file to the pizza.css style sheet. Close the file, saving your changes.
    3. Go to the pizza.css file in your text editor. Create a style rule to display the header, section, aside, tooter, and nav elements as blocks.
    4. Set the default padding and margin size to 0 pixels.
    5. Create a style for the body element to: a) set the background color to red; and b) set the font family to Verdana, Geneva, or sans-serif.
    6. The entire content of the page has been enclosed in a div container element with the id container. Create a style rule for this container to: a) set the width to 1000 pixels; b) center the container in the browser window by selling the top/bottom margins to 0 pixels and the left/right margins to auto; c) display a 1-pixel solid black border on the left and right edges; and d) set the background color to white and display the redbar.png image file as the background image, placing the image file in the top-left corner of the container and tiling it in the vertical direction only.
    7. Change the background color of the header element to white and set its height to 100 pixels.
    8. Create a style rule for the horizontal navigation list to: a) set the height to 70 pixels and the width to 100%; and b) set the background color to white.
    9. For eath list item within the horizontal navigation list, create a style rule to: a) set the background color to white; b) set the font size to 16 pixels, the height and the line height to 50 pixels, and the width to 180 pixels; c) display the item as a block and float it on the left; d) set the left and right margins to 5 pixels; and e) horizontally center the contents.
    10. For each hypertext link within a list item in the horizontal navigation list, create a style rule to: a) display the link as a block; b) set the background color to red and the text color to white; c) create elongated corners with a horizontal radius of 10 pixels and a vertical radius of 25 pixels (use progressive enhancement to support browser extensions); and d) remove the text underlining. If a user hovers a mouse pointer over these links, change the background color to the value (255, 101, 101) and the text color to black.
    11. Create a style rule for the vertical navigation list to: a) float it on the left only when the left margin is clear; and b) set the width to 200 pixels.
    12. For list items within the vertical navigation list, create a style rule to: a) remove the list item marker; b) indent the text 20 pixels; and c) set the top and bottom margins to 20 pixels.
    13. For hypertext links within the vertical navigation list, set the text color to white and remove the text underlining. When a user hovers the mouse pointer over these links, change the text color to black.
    14. The main content of the Web page is contained in a section element with the id main. Create a style rule for this element to: a) change the background color to the value (255, 211, 211); b) float the element on the left; and c) set the width to 600 pixels.
    15. For paragraphs that are direct children of the main section, set the font size to 20 pixels and the margin to 15 pixels.
    16. For inline images within the main section, create a style rule to: a) float the image on the right; b) set the margin to 15 pixels; c) set the width to 350 pixels; and d) set the radius of the bottom-left corner to 350 pixels (use progressive enhancement to support the Mozilla and WebKit browser extensions).
    17. Alice has included six coupons in the home page that have been nested within div elements belonging to the coupon class. For each coupon div element: a) add a 5-pixel dashed black border; b) float the coupons on the left; c) set the width to 170 pixels and the height to 150 pixels; and d) set the top and bottom margins to 20 pixels, and the left and right margins to 10 pixels.
    18. To the style rule for the coupons, add style properties to create the following two background images: a) place the slice.png image in the center of the coupon without tiling; and b) place the notice.png image in the bottom-right corner of the coupon without tiling. Set the background color of the coupon to white.
    19. For h1 headings within the coupons, add a style rule to: a) set the text color to white on a background with the color value (192, 0, 0); b) set the font size to 16 pixels and the kerning to 2 pixels; c) center the text; d) set the height to 25 pixels; and e) display the text in small caps.
    20. For paragraphs within the coupons, create a style rule to: a) set the font size to 14 pixels; b) center the text; and c) set the margin to 5 pixels.
    21. Alice has placed interesting tidbits about pizza in an aside element. Float the aside element on the left with a width of 200 pixels.
    22. For h1 headings within the aside element, create a style rule to: a) set the text color to the value(l92, 0,0); b) set the font size to 20 pixels and the kerning to 2 pixels; c) set the font weight to normal; and d) center the text of the headings.
    23. For list items within the aside element, create a style rule to: a) set the background color to the value (255, 135, 1 35); b) add round corners with a 5-pixel radius; c) set the text color to black; d) remove the list style maker; and e) set the margin to 10 pixels and the padding to 5 pixels.
    24. Display the footer element when the left margin is clear, and set the size of the left margin to 200 pixels.
    25. For the address element within the footer element, create a style rule to: a) add a l-pixel solid red border to the top of the element; b) change the text color to red; c) set the font size to 10 pixels, set the font style to normal, and center the address text; and d) set the top margin to 25 pixels and the bottom padding to 20 pixels.
    26. Add style comments throughout your style sheet to document your work and then save your changes.
    27. Open the redhall.htm file in your Web browser and verify that the design and layout resemble that shown in Figure 4-79.
    28. Submit your completed files to your instructor, in either printed or electronic form, as requested.

    Learn More

Items 1 to 10 of 69 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Ascending Direction