HTML/JS

Items 1 to 10 of 70 total

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

Grid  List 

Set Descending Direction
  1. New Perspectives HTML5 and CSS3 7th Edition Tutorial 10 Case 4 VoterWeb vw_result

    New Perspectives HTML5 and CSS3 7th Edition Tutorial 10 Case 4 VoterWeb

    Regular Price: $20.00

    Special Price: $15.00

    New Perspectives HTML5 and CSS3 7th Edition Tutorial 10 Case 4 VoterWeb


    VoterWeb Pam Carls is a manager for the website Voter Web, which compiles voting totals and statistics from local and national elections. Pam has the results of recent congressional elections from eight districts in Minnesota stored as multidimensional arrays in a JavaScript file. Pam wants you to create a script displaying these results and calculating the vote percentage for each candidate within each race. A preview of the page is shown in Fig 10-38


    Complete the following:
    1. Use your editor to open the vw_election_txt.html and vw_results_txt.js files from the html10 case4 folder. Enter your name and the date in the comment section of each file, and save them as vw_election.html and vw_results.js respectively.


    2. Go to the vw_election.html file in your editor. Directly above the closing tag, insert script elements to link the page to the vw_congminn.js and vw_results.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 above the footer, insert an empty section element. You will write the HTML code of the election report in this element. Save your changes to the file.


    4. Open the vw_congminn.js file in your editor and study the contents. Note that the file contains the results of 8 congressional elections in Minnesota. The candidate information is stored in multidimensional arrays named candidate, party, and votes. Do not make any changes to this file.


    5. Go to the vw_results.js file in your editor. Declare a variable named reportHTML containing the following HTML text
    <h1>title</h1>
    where title is the value of the raceTitle variable stored in the vw_congminn.js file.


    6. Create a for loop that loops through the contents of the race array using i as the counter variable. Place the commands specified in Steps a through e within this program for loop:
    a. Create a variable named totalVotes that will store the total votes cast in each race. Set its initial value to 0.
    b. Calculate the total votes cast in the current race by applying the forEach() method to ith index of the votes array using the calcSum() function as the callback function.
    c. Add the following HTML text to the value of the reportHTML variable to write the name of the current race in the program loop
    <table>
    <caption>race</caption>
    <tr><th>Candidate</th><th>Votes</th></tr>
    where race is the ith index of the race array.
    d. Call the candidateRows() function (you will create this function shortly) using the counter variable i and the totalVotes variable as parameter values. Add the value returned by this function to the value of the reportHTML variable.
    e. Add the text </table> to the value of the reportHTML variable.


    7. After the for loop has completed, write the value of the reportHTML variable into the innerHTML of the first (and only) section element in the document.


    8. Next, create the candidateRows() function. The purpose of this function is to write individual table rows for each candidate, showing the candidate's name, party affiliation, vote total, and vote percentage. The candidateRows() function has two parameters named raceNum and totalVotes. Place the commands in Steps a through c within this function.
    a. Declare a local variable named rowHTML that will contain the HTML code for the table row. Set the initial value of this variable to an empty text string.
    b. Create a for loop in which the counter variable j goes from 0 to 2 in steps of 1 unit. Within the for loop do the following:
     i. Declare a variable named candidateName that retrieves the name of the current candidate and the current race. (Hint: Retrieve the candidate name from the multidimensional candidate array using the reference, candidate[raceNum][j].)
     ii. Declare a variable named candidateParty that retrieves the party affiliation of the current candidate in the current race from the multidimensional party array.
     iii. Declare a variable named candidateVotes that retrieves the votes cast for the current candidate in the current race from the multidimensional votes array.
     iv. Declare a variable named candidatePercent equal to the value returned by the calcPercent() function, calculating the percentage of votes received by the current candidate in the loop. Use candidateVotes as the first parameter value and totalVotes as the second parameter value.
     v. Add the following HTML code to the value of the rowHTML variable
     <tr>
     <td>name (party)</td>
     <td>votes (percent)</td>
     </tr>
     where name is the value of candidateName, party is the value of candidateParty, votes is the value of candidateVotes, and percent is the value of candidatePercent. Apply the toLocaleString() method to votes in order to display the vote total with a thousands separator. Apply the toFixed(1) method to percent in order to display percentage values to 1 decimal place.
    c. Return the value of the rowHTML variable.


    9. Save your changes to the file, and then load vw_election.html in your browser. Verify that the three candidate names, party affiliations, votes, and vote percentages are shown for each of the eight congressional races.


    10. Pam also wants the report to display the vote percentages as bar charts with the length of the bar corresponding to the percentage value. Return to the vw_results.js file in your editor. At the bottom of the file, create a function named createBar() with one parameter named partyType. Add the commands described in Steps a through b to the function:
    a. Declare a variable named barHTML and set its initial value to an empty text string.
    b. Create a switch/case statement that tests the value of the partyType parameter.
    If partyType equal "D" set barHTML equal to:
    <td class="dem"></td>
    If partyType equals "R" set barHTML equal to:
    <td class="rep"></td>
    Finally, if partyType equals "I" set barHTML to:
    <td class="ind"></td>


    11. Return the value of barHTML.
    Next, add these empty data cells to the race results table, with one cell for every percentage point cast for the candidate.


    12. Scroll up to the candidateRows() function. Directly before the line that adds the HTML code to the value of the rowHTML variable, insert a for loop with a counter variable k that goes from 0 up to a value less than candidatePercent in increments of 1 unit. Each time through the loop call the createBar() function using candidateParty and candidatePercent as the parameter values.


    13. Add comments throughout the file with descriptive information about the variables and functions.


    14. Save your changes to the file, and then reload vw_election.html in your browser. Verify that each election table shows a bar chart with different the length of bars representing each candidate’s vote percentage.

    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 70 total

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

Grid  List 

Set Descending Direction