webd241 wk 6 assignment

General Instructions for your Assignments:

During Week 1 through Week 7 of this course, you will have a new assignment each week. You should create a new set of files for each assignment. During Weeks 1 through 7 you are NOT building on your previous assignment, like you did in WEBD121. Instead you are creating a new set of files for each assignment. However, make sure you save all of your files from each assignment because you will need them later for your Final Project. During Week 8, for your Final Project, you will create a Home Page with a navigation menu that uses JavaScript for drop-down sub-menus, which will link all of your previous assignments together, creating a comprehensive website that showcases all of your work this semester.

You must write the code files by hand for all assignments in this class. A simple text editor, such as Notepad or Notepad++ will suffice (or TextEdit on the Mac). DO NOT use GUI editors, such as FrontPage, Dreamweaver, etc. You must write the code for your web page files yourself. If you are using a PC, it is strongly recommended that you download the free Notepad++ text editor (https://notepad-plus-plus.org/) because it contains extra features which assist with debugging, such as line numbering and color coding of different elements of syntax. Mac users should use the TextEdit text editor that comes with the Mac OS. However, if you are a Mac user, make sure you set TextEdit to use Plain Text by default. You can find instructions for this here:

https://www.tekrevue.com/tip/textedit-plain-text-mode/

Make sure all of your web pages comply with the HTML 5 standards and CSS standards. DO NOT use obsolete HTML elements and attributes from previous versions of HTML. By including the HTML 5 DOCTYPE declaration in your webpages, and validating all of your HTML files at https://validator.w3.org/#validate_by_upload, you can be sure that your code complies with HTML 5. Also, make sure that your external style sheet (.css file) passes validation at the W3C CSS Validation Service: https://jigsaw.w3.org/css-validator/#validate_by_upload. Make sure you use the “Validate by File Upload” option (and NOT the “Validate by Direct Input” option), on both of these validators since this is the way your instructor will check your pages when grading your assignments.

Specific Instructions for Assignment 6:

Perform all of the following steps to complete this assignment:

1) Begin by creating a new file in your text editor and include all of the basic HTML code like you did in your previous assignments. Or you can simply make a copy of your HTML file from last week and name the new copy LastFirstAssignment6.html (where “Last” is your last name and “First” is your first name), but be careful not to overwrite your file from last week because you will need it again when you do your Final Project during Week 8.

2) Make sure you change the contents of the <title> tag to “Assignment 6” (just the words – not the quotation marks) and make sure your full name is inside of the <h1> heading, just like in your previous assignments. Also, delete the contents of the <script> tag — everything between the <!– and //–> tags, if you created your new file by making a copy of your previous file, because you will be creating a brand new page with different JavaScript code for this assignment. Save your file.

3) Upload the new file to the HTML validator to check for compliance with the HTML5 standards here: https://validator.w3.org/#validate_by_upload. Your file should pass validation. If you receive any errors or warnings, then go back through the previous steps of the assignment again until you have corrected all errors and your file passes validation.

4) Create another new file in your text editor and save it as Assignment6.css or make a copy of last week’s CSS file, being careful not to overwrite last week’s file.

5) In your CSS file, write code to set the background color of your page to #FFFFE6 and write code to center the h1 element. Save your CSS file.

6) View your webpage again in your browser and confirm that your page has a light yellow background and that the heading is centered. Upload your CSS file to the CSS validator to check for compliance with the CSS standards here: https://jigsaw.w3.org/css-validator/#validate_by_upload. Your file should pass validation. If you receive any errors or warnings, debug your CSS code until you have corrected all errors and your file passes validation.

7) Open your Assignment 6 HTML file for editing. If you need a refresher on creating an HTML form, make sure you look at the Week 6 Lessons in the Lessons area of the classroom.

Create a form that contains text inputs for the user’s first name and last name. Add an email input for the user’s APUS email address. Add a select element that lists 5 school subjects and asks the user to choose their favorite subject. Make sure you have descriptive text before each input so that the user knows what they are supposed to enter or select for each input field.

Next, use JavaScript to validate each form input and print an alert message to the user for each field that fails validation. Write a function similar to the checkForm() function in Lab 10-5 that checks to make sure the user has not left any fields blank.

Note: Do not use the “required” keyword on your HTML form inputs. Although this is one way of requiring user’s to complete certain form inputs, you are specifcially being asked to use JavaScript to validate your form inputs instead. Follow the code examples in your textbook for this.

8) Use pattern matching to verify that the user has entered an APUS email address. Look at the example in the sections, “the email object” in Chapter 10.5 of your textbook for an example of how to code this.

9) You may add any additional HTML, CSS, or JavaScript content that you wish, to practice more of the features that you have learned about in your online textbook, as long as all of your code files still pass validation. However, do not add anything to your files that would make them invalid according to the standards. You can confirm this by making sure your files still pass validation.

10) Before submitting your assignment, validate your HTML and CSS files one last time at https://validator.w3.org/#validate_by_upload AND https://jigsaw.w3.org/css-validator/#validate_by_upload, using the “Validate by File Upload” option. Note: It is critical that you debug and fix ALL errors identified by the validator before submitting your assignments. Contact your instructor for assistance if you are having difficulty debugging and fixing your errors because it is imperative that all of your code files pass validation.

11) Create a zip archive containing all pages pertaining to your website (.html files, .css files, .js files, image files, etc). Make sure you maintain the necessary directory structure in your zip archive so that your webpages will view correctly when unzipped. In other words, if your images are in a sub-folder, in relation to the folder containing your .html file, then you need to maintain that same directory structure in your zip archive, too, including the sub-folder. Submit only the zip file for grading.

Validation Requirements:

Before submitting your web site:

  1. Validate your HTML file at https://validator.w3.org/#validate_by_upload, using the “Validate by File Upload” option, and fix any errors that the validator identifies before submitting your web site for grading.
  2. Validate your CSS file at https://jigsaw.w3.org/css-validator/#validate_by_upload, using the “Validate by File Upload” option, and fix any errors that the validator identifies before submitting your web site for grading.

Note: It is critical that you debug and fix ALL errors identified by these two code validators before submitting your assignments. Contact your instructor for assistance if you are having difficulty debugging and fixing your errors because it is imperative that your code files pass validation. Remember that valid JavaScript relies on a foundation of valid HTML and valid CSS to function as intended.

Submission Instructions: Create a zip file containing all files related to your web page (.html files, .css files, .js files, image files, etc). Make sure you maintain the necessary directory structure in your zip file so that your webpages will view correctly when unzipped. In other words, if your images are in a sub-folder on your computer, in relation to the folder containing your .html file, then you need to maintain that same directory structure in your zip file, too. Submit only the zip file for grading.

Rubric for Grading Assignment

Points

HTML file(s) validate without errors at https://validator.w3.org/#validate_by_upload

10

CSS file(s) validate without errors at https://jigsaw.w3.org/css-validator/#validate_by_upload

10

All required HTML code is present.

10

All required CSS code is present.

10

Correctly created HTML form and checked all fields for validation using JavaScript.

40

Used pattern matching to verify that the user entered an APUS email address.

10

Correctly named files, and correctly created zip archive that contains all files for webpage (maintaining original folder structure).

10

Total

100

***Note: Your webpage must include the JavaScript functionality asked for in this assignment to receive credit for this assignment. You cannot receive partial credit simply for submitting HTML or CSS code, or JavaScript from previous assignments.

Please use APA formatting and in text cititation

Please No Plagiarism