1

Homework 8   Re-write this code using a style sheet not in-line styles <html> <head><title>position</title> </head> <body>...

Question

Homework 8   Re-write this code using a style sheet not in-line styles <html> <head><title>position</title> </head> <body>...

1. Create an HTML file that uses an alert dialog box to display the message Hi There! when the page loads 2. Create an HTML

Homework 8   Re-write this code using a style sheet not in-line styles

<html> <head><title>position</title>

</head>

<body>

<img src= "snow.jpg" style="positon: absolute; top:0px; left: 0px; z-index: 1">

<img src="nagano_1.jpg" Style = "position: absolute; top:70px;

left: 150px; z-index:2">

<h1 style= "position: fixed; top:50px; left: 50px; color:2338ee; z-index:3";>

this is a test of position</h1>

</body></html>

1. Create an HTML file that uses an alert dialog box to display the message "Hi There!" when the page loads 2. Create an HTML file that creates a variable named TestScore. Use a prompt-function dialog box to ask the user to specify a value for the variable. Then, use a series of if-else statements to display the corresponding grade based on the following: 90 to 100: A 80 to 89: B 70 to 79: C 60 to 69: D Below 60: F

Answers

1)HTML page displaying the message 'Hi There!' at loading:

1 2 3 4 5 6 7 8 9 10 first.html x <!DOCTYPE html> <html> <head> <title>position</title> <script> alert(Hi There!); </scriptOutput:

first.html х + → X File | C:/Xampp/htdocs/test/first.html This page says Hi There! OK

3 position X + File | C:/xampp/htdocs/test/first.html ulls is test of position

SOURCE CODE:

<!DOCTYPE html>
<html>
<head>
   <title>position</title>
<script>
   alert("Hi There!");
</script>
</head>
<body>
   <img src= "snow.jpg" style="positon: absolute; top:0px; left: 0px; z-index: 1">

   <img src="nagano_1.jpg" Style = "position: absolute; top:70px; left: 150px; z-index:2">

   <h1 style= "position: fixed; top:50px; left: 50px; color:2338ee; z-index:3";>this is a test of position</h1>
</body>
</html>

2) HTML page displaying grades and score

X 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 first.html <!DOCTYPE html> <html> <head> <title>position</ti

position Х + x File | C:/xampp/htdocs/test/first.html This page says Please enter test score OK Cancel

C position X + File | C:/xampp/htdocs/test/first.html This page says Please enter test score 89 ОК Cancel

position X + File | C:/xampp/htdocs/test/first.html This page says Grade: B OK

3 position X + File | C:/xampp/htdocs/test/first.html ulls is test of position

SOURCE CODE:

<!DOCTYPE html>
<html>
<head>
   <title>position</title>
<script>
   var TestScore = prompt("Please enter test score", " ");
   var testScoreGrade;
if(TestScore >= 90 && TestScore <= 100)
   testScoreGrade = 'A';
else if(TestScore >= 80 && TestScore <= 89)
   testScoreGrade = 'B';
else if(TestScore >= 70 && TestScore <= 79)
   testScoreGrade = 'C';
else if(TestScore >= 60 && TestScore <= 69)
   testScoreGrade = 'D';
else if(TestScore < 60)
   testScoreGrade = 'F';

   alert("Grade: "+testScoreGrade);

</script>
</head>
<body>
   <img src= "snow.jpg" style="positon: absolute; top:0px; left: 0px; z-index: 1">

   <img src="nagano_1.jpg" Style = "position: absolute; top:70px; left: 150px; z-index:2">

   <h1 style= "position: fixed; top:50px; left: 50px; color:2338ee; z-index:3";>this is a test of position</h1>
</body>
</html>

EXPLANATION:

Generally,in HTML with the help of javascript we can popup the message using global functions like - alert(), prompt() and confirm().

alert() - With 'OK' button displays a popup message on the screen.

confirm() - With 'OK' and 'Cancel' buttons popup a message and takes the user confirmation for proceeding.

prompt() - Takes the input message and displays the output through popping up the message.

Please note that I have taken some samples from internet and I'm displaying those as per the requirement here.


Similar Solved Questions

1 answers
Which country has experienced higher growth per capita: Economic Growth Skills Check • Short answer questions...
which country has experienced higher growth per capita: Economic Growth Skills Check • Short answer questions continued 3. Which country has experienced higher growth per capita: A, whose economy is growing a 4% rate & whose population is growing at a 3% rate Or B, whose economy is ...
1 answers
Gold Nest Company of Guandong, China, is a family-owned enterprise that makes birdcages for the South...
Gold Nest Company of Guandong, China, is a family-owned enterprise that makes birdcages for the South China market. The company sells its birdcages through an extensive network of street vendors who receive commissions on their sales. The company uses a job-order costing system in which overhead is ...
1 answers
A diffraction grating is made up of slits of width 300 nm with separation 900 nm....
A diffraction grating is made up of slits of width 300 nm with separation 900 nm. The grating is illuminated by monochromatic plane waves of wavelength λ 600 nm at normal incidence (a) How many maxima are there in the full diffraction pattern? (b) What is the width of a spectral line observed...
1 answers
Required Information Exercise 8-35 & 8-36 (Algo) (LO 8-5) (The following information applies to the questions...
Required Information Exercise 8-35 & 8-36 (Algo) (LO 8-5) (The following information applies to the questions displayed below) The Matsul Lubricants plant uses the FIFO method to account for its work-in-process inventories. The accounting re show the following Information for a particular day. 9...
1 answers
On May 1, 2018, Love Corporation declared a $86,900 cash dividend to be paid on May...
On May 1, 2018, Love Corporation declared a $86,900 cash dividend to be paid on May 31 to shareholders of record on May 15. Required: Record the events occurring on May 1 and May 31 in a horizontal statements model. In the Cash Flow column, indicate whether the item is an operating activity (OA), in...
1 answers
The equilibrium price at which a perfectly competitive firm sells its good is $8. The profit-maximizing...
The equilibrium price at which a perfectly competitive firm sells its good is $8. The profit-maximizing quantity of output is 200 units. At this quantity of output, the firm has an average fixed cost of $4 and an average variable cost of $s. In the short this perfectly competitive firm should...
1 answers
Question 1 Sunland Corporation manufactures a single product. Monthly production costs incurred in the manufacturing process...
Question 1 Sunland Corporation manufactures a single product. Monthly production costs incurred in the manufacturing process are shown below for the production of 3,700 units. The utilities and maintenance costs are mixed costs. The fixed portions of these costs are $329 and $220, respectively. 3,70...
1 answers
Bell Computers purchases integrated chips at $350.00 per chip. The holding cost is $35.00 per unit...
Bell Computers purchases integrated chips at $350.00 per chip. The holding cost is $35.00 per unit per year, the ordering cost is $120.00 per order, and sales are steady at 400 per month. The company's supplier, Rich Blue Chip Manufacturing, Inc, decides to offer price concessions in order to at...
1 answers
How much heat is needed to heat 100g of water initially at room temperature (20 degrees...
how much heat is needed to heat 100g of water initially at room temperature (20 degrees C) to a final temperature of 70 degrees C. The specific heat of water is 1.p cal/g×degrees C....
1 answers
A building contractor is to dig a foundation 12 feet long. 9 feet wide, and 6...
A building contractor is to dig a foundation 12 feet long. 9 feet wide, and 6 feet deep for a toll booth The contractor pays $20 per load for trucks to remove the dirt. Each truck holds 6 cubic yards. What the cost to the contractor to have all the dirt hauled away? Show your work....
1 answers
Proving identity (sinx+tanx)/(cosx+1)=tanx RS: (sinx+(sinx/cosx))/(cosx+1) ((sinxcosx/cosx)+(sinx/cosx))x 1/(cosx+1) sinx(cosx+1)/cosx x 1/(cosx+1) sinx/cosx = tanx RS = LS How did sinxcosx/cosx turn to sinx(cosx+1)
Proving identity(sinx+tanx)/(cosx+1)=tanxRS: (sinx+(sinx/cosx))/(cosx+1)((sinxcosx/cosx)+(sinx/cosx))x 1/(cosx+1)sinx(cosx+1)/cosx x 1/(cosx+1)sinx/cosx = tanxRS = LSHow did sinxcosx/cosx turn to sinx(cosx+1)?...
1 answers
Problem 1 The function P(x) is given as a graph, Find the domain of P Find...
Problem 1 The function P(x) is given as a graph, Find the domain of P Find the range of P Evaluate P(2) For what value of x is P(x) = -1 . -5-4-3-2-1 12 34 5 P(x) . Problem 2 Write a function f as a set of ordered pairs with the following domain and range Domain: (2,-3,0) Range: (6,2,1.5, -1} Evalua...
1 answers
A car, C, and a truck, T are each travelling around the same horizontal circular track...
A car, C, and a truck, T are each travelling around the same horizontal circular track at constant speed. At the instant shown C is moving case. at 23.0 m s^-1 and T is moving north-west (i.e N 45 degree W) at 14.0 ms^-1. Draw a labelled vector diagram that shows the relation between the velocities ...
1 answers
How fast will an object with a mass of #24 kg# accelerate if a force # 45 N# is constantly applied to it?
How fast will an object with a mass of #24 kg# accelerate if a force # 45 N# is constantly applied to it?...
1 answers
Consider the equilibrium reaction. 3A+B-20 After multiplying the reaction by a factor of 2, what is...
Consider the equilibrium reaction. 3A+B-20 After multiplying the reaction by a factor of 2, what is the new equilibrium equation? new equilibrium equation: Create the equilibrium-constant expression, K., for the new equilibrium reaction. Answer Bank LAP B B14 If the initial reaction contains 2.05 MA...
1 answers
For the following two scenarios, describe whether the implied demand uncertainty would increase, decrease or stay...
For the following two scenarios, describe whether the implied demand uncertainty would increase, decrease or stay the same? Explain the reason why. (i) A company introducing five new products to the market at the same time. (ii) A company planning to enhance its service level from 90% to 95%....

-- 0.041819--