Question

HTML / CSS

Content Requirements

Create a home page with the following elements and settings:

Set the background, font colors, and “theme” to match those used in lab assignment #1 using an external css file; inline styling should be used only where necessary to override styling from the external css

H1 element, centered at the top of the page, with “Thank you for choosing Your Company Name. . . “ text*

Div or other container with at least 5 sentences containing information about your company (e.g., company philosophy, history, information about products, mission statement, etc.). This should occupy 70% of the browser's width*

Image with your company’s logo appearing to the right of the div element (use the same logo image you used in project 1); this should appear to the right side of the div*

A second Div or other container element with a width set to 70% of the browsers width (see instructions below for information on assigning the text to the div element)

Anchor element with no text (see instructions below for information on assigning the text to the anchor element)

At least 1 additional image that coincides with your company/product theme (this may be used wherever/however you like)

Any other elements you wish to use to enhance your home page (as long as they do not conflict with the requirements)

*These elements should be formatted to "match" those at the top of the survey page.

Coding Requirements

Write code that will first check to see if a cookie exists when the page loads. If the cookie does not exist, show the correct text in the div and anchor elements (you may paste from the “Document Text” section below). For example:

Thank You for Choosing Sunrise Coffee Creations Sunrise Coffee Creations is a family-owned establishment located in Dallas, TX. We are dedicated to bringing our customers the best coffee products available. From whole beans to finely-ground espressos, we offer the highest-quality coffee around. Come into one of our coffee shops and enjoy our relaxing, friendly atmosphere. Would you rather shop in the comfort of your own home? No problem. Sit back, relax, and shop our products online. Either way, we feel confident you will enjoy the great service and products we provide Want a more personalized experience on our website? Please click here to provide your name Figure 1 h1 element div element anchor element

When the user clicks the anchor element to provide his/her name, display a prompt window asking for the user’s name. When the user provides his/her name, store it in a cookie file (set to expire in 7 days), update the second div element with the appropriate “welcome” text, and remove the text from the anchor element. For example:

Figure 2

If the cookie does exist when the page loads, show the correct text in the div and anchor elements (you may paste from the “Document Text” section below), including the name from the cookie. For example:

Figure 3

If the user clicks the anchor element (as shown above), display a prompt window asking for the user’s name. When the user provides his/her name, update the second div element with the appropriate “welcome” text, store the name in a cookie file, and remove the text from the anchor element (please see Figure 2).

In addition, 5 seconds after the body loads, generate a random number. Multiply the random number by 10 and round to the nearest whole number. If the rounded number is a multiple of 5, display the appropriate alert message to indicate the user has been selected for a survey (please see “Document Text” section below for the correct message).   For example:

Figure 4

Document Text

You may copy these blocks of text into your document where applicable, but be sure you have added any necessary special characters (like the Registered Trademark symbol) and style settings as shown in the provided screen shots.

h1

Thank you for choosing Sunrise Coffee Creations®

div (when cookie does exists)

Welcome, . We hope you will enjoy your experience!.

div (when cookie does not exist)

Want a more personalized experience on our website?

a (when cookie does exists)

Please click here if you are not .

a (when cookie does not exist)

Please click here to provide your name.

Alert message (show this message if the rounded random number * 10 is a multiple of 5)

You have been randomly selected to participate in a customer satisfaction survey.

Prompt message (show this prompt if the user clicks the anchor element)

Please enter your name:

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

This html code for home page:

home.html(write your content in <p></p> tag)

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>home.html</title>
<style>
body {background-color:   #FFA07A;
}
</style>
</head>
<body >
<center>
<h1>Thank you for choosing Sunrise Coffee Creations®</h1>
</center>

<div style="float: right; clear: left;" id="main" align="right" style="width: 300px; height: 400px;">
<img src="coffee1.jpg" height="300" />
</div>

<div align="left" style="color:#FF4500">
<p> We are a local non-profit community that sells rummage items.</p>
<p> This week we are selling pens to sell in order to raise money. </p>
<p> As of now we have run out of all items except for our pens. </p>
<h4> Product Information: </h4>
<p> Pens come in 10 packs with 5 in blue ink, 5 in black ink.<br /> Ballpoint pens
weighing in at 11.6 grams with attached comfort grips, good for use in the office or in school! </p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p></p>

</div>

<div id="main" align="left" style="width: 300px; height: 400px;">
<img src="coffee2.jpg" height="300" />
  
</div>

<div style="float: right; clear: left;" id="main" align="right">
<p align="left"> Want a more personalized experience on our website?</p>
<p align="left" > <a href="login.html"> Please click here to provide your name. </a><p>
</div>

</body>
</html>

login.html

<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<script language="javascript" type="text/javascript" >

function testJS()
{

var b = document.getElementById('name').value

document.getElementById('here').innerHTML = b;

}
</script>
</head>
<body>
<form action="profile.html">
Enter Your Name:<input type="text" id="name">
<input type="submit" id="print" onClick="testJS()" >

</form>
</body>
</html>

profile.html

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>home.html</title>
<style>
body {background-color:   #FFA07A;
}
</style>
<script type="text/javascript">
function testJS()
{

var b = document.getElementById('name').value

document.getElementById('here').innerHTML = b;

}
</script>
</head>
<body >
<center>
<h1>Thank you for choosing Sunrise Coffee Creations®</h1>
</center>

<div style="float: right; clear: left;" id="main" align="right" style="width: 300px; height: 400px;">
<img src="coffee1.jpg" height="300" />
</div>

<div align="left" style="color:#FF4500">
<p> We are a local non-profit community that sells rummage items.</p>
<p> This week we are selling pens to sell in order to raise money. </p>
<p> As of now we have run out of all items except for our pens. </p>
<h4> Product Information: </h4>
<p> Pens come in 10 packs with 5 in blue ink, 5 in black ink.<br /> Ballpoint pens
weighing in at 11.6 grams with attached comfort grips, good for use in the office or in school! </p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p></p>

</div>

<div id="main" align="left" style="width: 300px; height: 400px;">
<img src="coffee2.jpg" height="300" />
  
</div>

<div style="float: right; clear: left;" id="main" align="right">
<p align="left"><br id="here"></br> Welcome, Joe we hope you will enjoy your sunrise coffee creation experiance! </p>

</div>

</body>

</html>

Output:

園Java EE-http://localhost8081/CheggReservationSystem/home.html-Eclipse File Edit Navigate Search Project Run Window Help 饴| |

Add a comment
Know the answer?
Add Answer to:
HTML / CSS Content Requirements Create a home page with the following elements and settings: Set...
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
  • Look at the following illustrated output for an HTML and a css given below <!DOCTYPE html>...

    Look at the following illustrated output for an HTML and a css given below <!DOCTYPE html> <head> <title>TABLE with STYLE SHEET</title> <meta charset="utf-8" /> <meta name="description" content="Godaddy Webpage original" /> <link rel = "stylesheet" href="GoDaddy_assignment_1.css"> <body> <img src= "GoDaddy.png"/> <p>Welcome to:<strong>webhamster.com</strong></br> This web page is parked<strong>Free</strong>courtesy of <a class="aclass1" href ="https://www.godaddy.com">GoDaddy.com</a></p> <h1>Want to buy<span class ="span2">webmaster.com ?</span></h1> <div class ="div1"> <a class ="aclass2" href="https://www.godaddy.com">Learn How</a> </div> </hr> <button>Search Ads</button> </body> </html> “ QUESTION continued Given the corresponding css file .aclass1{color:purple;}...

  • Please build a web page in HTML/css that does the following: The Home Page: It should...

    Please build a web page in HTML/css that does the following: The Home Page: It should be a welcome page with options to buy sell or trade. The Buy Page: You should be asked "What book are you trying to buy?" and be able to enter a book name After pressing enter you should see a list of books that fell under what you searched. The Sell Page: You should be asked "What book are you trying to sell?" and...

  • for Javascript, JQuery When the page is first opened a user will see the name field...

    for Javascript, JQuery When the page is first opened a user will see the name field and the three vacation images to the left of the page. The page should behave according to the following rules. 1. When a user's mouse pointer goes over any image, that image's border will change to be "outset 10px" and when the mouse pointer leaves that image it's border will change to "none". 2. When the user clicks a "Vacation" image on the left,...

  • Please Help!!! Requirements: Use an external CSS & JS file, no internal or inline styles &...

    Please Help!!! Requirements: Use an external CSS & JS file, no internal or inline styles & scripts Please comment your JS to demonstrate your understanding of what is happening Create a form with at least 2 inputs and a submit button A good example would be First Name, Last Name, and Age. Use JS to provide the user with some feedback on the values they enter or choose with your inputs To do this you will need create a function...

  • Create an HTML5 page that contains a form to collect the following data. The text in...

    Create an HTML5 page that contains a form to collect the following data. The text in bold indicates the id value that should be assigned to each html control: Product (drop down list) product – iPad, iPhone 6S, Galaxy 5S, Moto X, and so on Quantity (number) quantity Unit price (number) unit_price Discount (%)(number) discount_rate Date (date)   order_date First Name (text box)   first_name Last Name (text box)   last_name Payment type (drop down list)   payment_type – Visa, Master, Discover, Amex, and...

  • 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...

  • PHP Programming In this project, you will create a Web page that allows visitors to your...

    PHP Programming In this project, you will create a Web page that allows visitors to your site to sign a guest book that is saved to a database. Create a new document in your text editor and type the <!DOCTYPE> declaration, <html> element, document head, and <body> element. Use the strict DTD and “Guest Book” as the content of the <title> element. Add the following text and elements to the document body: <h2>Enter your name to sign our guest book</h2>...

  • NEED HELP with HTML with Javascript embedding for form validation project below. I have my code...

    NEED HELP with HTML with Javascript embedding for form validation project below. I have my code below but I'm stuck with validation. If anyone can fix it, I'd really appreciate. ****************************************************************************** CODE: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Nice</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var textFromTextArea; function getWords(){ var text =...

  • In this problem, you will create a selectable “To Do” List. To add a task to...

    In this problem, you will create a selectable “To Do” List. To add a task to this list, the user clicks the Add Task button and enters a description of the task. To delete a task from the list, the user selects the task and then clicks the Delete Task button. Open the HTML and JavaScript files provided as start-up files (index.html from within todo_list_Q.zip file). Then, review the HTML in this file. Note, within the div element, there is...

  • Modify the following file, so that: If the user input for the age input box is...

    Modify the following file, so that: If the user input for the age input box is empty, please send the user a warning message: “Age field cannot be empty” and return to the form web page to allow the user to re-input the age; If the user input for the age input box is incorrect (e. g. less than 1), please also send the user a warning message: “Your age input is not correct!” and return to the form web...

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