Question

Perform all of the following steps using Notepad to complete this assignment: 1) Begin by creating...

Perform all of the following steps using Notepad 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 LastFirstAssignment7.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 7” (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 Assignment7.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 #FFB3B3 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 pale red 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 7 HTML file for editing. Next, you will reuse and slightly modify code from Lab 11-4. Make sure you change the value of "expires" to a future date. Similar to Lab 11-4, prompt the user to enter a hexidecimal color code. However, instead of prompting them for their name, prompt them to enter their age. Your code should set a cookie with the information the user enters and then retrieve that information from the cookie and set the page background to the color entered by the user.

Note: It is recommended that you test this assignment in Internet Explorer and/or Firefox. This code may not work correctly in Chrome.

8) 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.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

..............................................................................................................................................................

Create a folder and then make a two file one is LastFirstAssignment1.html and other Assignment1.cssinside this folder and copy paste the code given below on the respective page

=======================================

LastFirstAssignment1.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Assignment 1</title>
<!-- css link-->
<link rel="stylesheet" type="text/css" href="Assignment1.css">
</head>
<!-- body -->
<body>
<h1>Your Name</h1>
<hr />
<!-- Javascript code-->
<script>
var versions = navigator.appVersion;
var agents = navigator.userAgent;
var browserName = navigator.appName;
var fullVersion = ''+parseFloat(navigator.appVersion);
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;

// In Opera 15+, the true version is after "OPR/"
if ((verOffset=agents.indexOf("OPR/"))!=-1) {
browserName = "Opera";
fullVersion = agents.substring(verOffset+4);
}
// In older Opera, the true version is after "Opera" or after "Version"
else if ((verOffset=agents.indexOf("Opera"))!=-1) {
browserName = "Opera";
fullVersion = agents.substring(verOffset+6);
if ((verOffset=agents.indexOf("Version"))!=-1)
fullVersion = agents.substring(verOffset+8);
}
// In MSIE, the true version is after "MSIE" in userAgent
else if ((verOffset=agents.indexOf("MSIE"))!=-1) {
browserName = "Microsoft Internet Explorer";
fullVersion = agents.substring(verOffset+5);
}
// In Chrome, the true version is after "Chrome"
else if ((verOffset=agents.indexOf("Chrome"))!=-1) {
browserName = "Chrome";
fullVersion = agents.substring(verOffset+7);
}
// In Safari, the true version is after "Safari" or after "Version"
else if ((verOffset=agents.indexOf("Safari"))!=-1) {
browserName = "Safari";
fullVersion = agents.substring(verOffset+7);
if ((verOffset=agents.indexOf("Version"))!=-1)
fullVersion = agents.substring(verOffset+8);
}
// In Firefox, the true version is after "Firefox"
else if ((verOffset=agents.indexOf("Firefox"))!=-1) {
browserName = "Firefox";
fullVersion = agents.substring(verOffset+8);
}
// In most other browsers, "name/version" is at the end of userAgent
else if ( (nameOffset=agents.lastIndexOf(' ')+1) <
(verOffset=agents.lastIndexOf('/')) )
{
browserName = agents.substring(nameOffset,verOffset);
fullVersion = agents.substring(verOffset+1);
if (browserName.toLowerCase()==browserName.toUpperCase()) {
browserName = navigator.appName;
}
}
// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1)
fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1)
fullVersion=fullVersion.substring(0,ix);

majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
fullVersion = ''+parseFloat(navigator.appVersion);
majorVersion = parseInt(navigator.appVersion,10);
}

// print the browser
document.write(''
+'You are using the following browser: '+browserName+'<br>'
+'You are using the following version of this browser: '+fullVersion+'<br>'
)
</script>
</body>
</html>

===============================================

Assignment1.css

/* css to change the body background color*/
body
{
background-color:#FFE6FF;
}
/ css to align the h1 tag in center /
h1
{
text-align:center;
}

OUTPUT:

For the remaining problems please post again friend as per HomeworkLib rules first question should be the answer when multiple questions are posted. If you have any doubt please ask me friend and if you are satisfied with my solution please give me thumb up.

Add a comment
Know the answer?
Add Answer to:
Perform all of the following steps using Notepad to complete this assignment: 1) Begin by creating...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Creating the Home and Template Pages Overview In this assignment, you will start building your Web...

    Creating the Home and Template Pages Overview In this assignment, you will start building your Web site for your fictional organization by creating a homepage using HTML5 and some of the key elements that define a Web page. You are required to use either a simple text editor to write your code, or an enhanced text editor such as Brackets. Note: Microsoft Word is not a good tool for developing code because it is a document processor and not a...

  • 2 Apply Your Knowledge Reinforce the skills and apply the concepts you learned in this chapter Styling a Webpage Instru...

    2 Apply Your Knowledge Reinforce the skills and apply the concepts you learned in this chapter Styling a Webpage Instructions: In this exercise, you will use your text editor to create external, embedded, and inline styles for the Durango Jewelry and Gem Shop home page. You will style the sections of the semantic wireframe header, nav, main, and tooter and a div element that surrounds all of the content to center the content on the page. You will also float...

  • n the Labs Labs 1 and 2, which increase in difficulty, require you to create webpages based on what you learned in the...

    n the Labs Labs 1 and 2, which increase in difficulty, require you to create webpages based on what you learned in the chapter; Lab 3 requires you to dive deeper into a topic covered in the chapter. Lab 1: Creating an External Style Sheet for City Farmer Problem: You work for a local but rapidly growing gardening supply company called City Farmer that specializes in products that support food self-sufficiency. The company has hired you to help create the...

  • Can someone plz help me??? I would like a website that has to do with guitars...

    Can someone plz help me??? I would like a website that has to do with guitars or something to do with music, someone asked me what kind of website I would like to have and that would be awesome. The attributes to be included, are below. I need a small website that to where I need to interlink a CSS file into the HTML file. I don't know to save the files to have to be able to run with...

  • (Below I have posted my full assignment so my question makes sense with context. The part...

    (Below I have posted my full assignment so my question makes sense with context. The part I am struggling with is section e. I am not sure how to create the said class. If you could help it would be appreciated. Also, this is all HTML code.) In this assignment you will create a web page about your favorite TV show of all-time and link it to an external style sheet to apply a few CSS rules to it. Follow...

  • You've been hired to create a website for Eating Well in Season, a business in Glover,...

    You've been hired to create a website for Eating Well in Season, a business in Glover, Vermont, that delivers produce from local farms to its customers. Another team member has created a style sheet for the site but has been unable to resolve some errors in the code. You continue your work on the site by linking to and debugging the style sheet, incorporating a color scheme, and aligning the page content. index.html <!DOCTYPE html> <html lang="en"> <head> <title>Eating Well...

  • given below are the project description and their Html and css files i need javascript according to the project and other files!

    HTML------------------------------------------------------CSS---------------------------------------------------WEB230 - JavaScript 1 Assignment 7 - FormsSome of these tasks would be better done in HTML or CSS but do them in JavaScript to practice whatwe have learned.1. Select the form element and save it in a variable. From here we can access all of the form fields.2. When the page loads do the following:add the password value "monkey"select the favourite city "New York"clear the textarea3. Add an event handler to the "name" field to change the background color...

  • This assignment is designed to give you practice with Javadoc, creating unit tests and using Junit....

    This assignment is designed to give you practice with Javadoc, creating unit tests and using Junit. Be sure to follow all style and documentation requirements for THIS class. See the style and documentation requirements posted on Canvas. You are to name your package assign1 and your file Palindrome.java. Palindrome Class Palindrome testString : String + Palindrome (String) + isPalindrome (): boolean The method isPalindrome is to determine if a string is a palindrome. A palindrome, for this assignment, is defined...

  • Create a website on a topic of your choosing. Site should include the following: Design: Site...

    Create a website on a topic of your choosing. Site should include the following: Design: Site Map (Task 7) Page-layout for each page (Task 8) Homepage . . o Title o Navigation Links o Footer o Minimum of 1 graphic 4 additional pages that are linked to home page o o o Navigation Links (link back to homepage) Minimum of 1 graphic per page Footer (matching homepage) CSS should be used for formatting visual aspects of site. Use either external...

  • Need help with creating this JavaScript file. I'm not sure where or how to begin. 1. You are working solely with the DOM object. Thus, you should be coding primarily in the js file. You must use...

    Need help with creating this JavaScript file. I'm not sure where or how to begin. 1. You are working solely with the DOM object. Thus, you should be coding primarily in the js file. You must use the addEventListener, in addition you may need to use id and class attributes as needed. The .html and .css files have been provided to you. See the .png files for an example of what is expected. 2. Place the javaScript file in its...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT