Create In your HTML:a heading that says "Crack the combo"three paragraphs underneath it. Each has an an input tag followed by the word "first number", "second number" , "third number"a paragraph with a button that says "guess"A small heading saying "Number of guesses"A small heading saying "0"A small heading saying "Numbers right"A slightly larger heading underneath that which says "- - - -" and will be changed each time to tell the user how many numbers they got rightStyle it up nicely so it looks goodYou are done when you have all of this
Question
Create In your HTML:a heading that says "Crack the combo"three paragraphs underneath it. Each has an an input tag followed by the word "first number", "second number" , "third number"a paragraph with a button that says "guess"A small heading saying "Number of guesses"A small heading saying "0"A small heading saying "Numbers right"A slightly larger heading underneath that which says "- - - -" and will be changed each time to tell the user how many numbers they got rightStyle it up nicely so it looks goodYou are done when you have all of this
Solution
Sure, here is the HTML code for your requirements:
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
.container {
width: 80%;
margin: 0 auto;
padding: 20px;
}
h1, h2, h3 {
color: #333;
}
input {
margin-bottom: 10px;
padding: 5px;
}
button {
padding: 10px 20px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<h1>Crack the combo</h1>
<p><input type="number" id="firstNumber"> first number</p>
<p><input type="number" id="secondNumber"> second number</p>
<p><input type="number" id="thirdNumber"> third number</p>
<p><button id="guessButton">guess</button></p>
<h2>Number of guesses</h2>
<h3>0</h3>
<h2>Numbers right</h2>
<h1>- - - -</h1>
</div>
</body>
</html>
This HTML code creates a webpage with a heading "Crack the combo", three paragraphs each with an input field followed by the words "first number", "second number", "third number". There is also a paragraph with a button that says "guess". There are small headings saying "Number of guesses", "0", "Numbers right" and a slightly larger heading saying "- - - -". The webpage is styled with CSS for a nice look.
Similar Questions
Create In your HTML:a heading that says "Play Rock Paper Scissors"a paragraph underneath it with an input tag and a button in it. The paragraph should say "How many games would you like to play?" then the input, then a button that says "choose number of games"another paragraph that contains three buttons, one that says Rock, one that says paper, one that says scissorsa table with 2 rows and 3 boxes in each rowA paragraph that says "Games to play"A paragraph that says "0"Style it up nicely so it looks goodYou are done when you have all of this
make a variable outside of all functions called numGamesdefine another function called setNumberOfGames. Attach it to the button for choosing the number of games. It should find the input where the user chose their number of games, and store the number in numGamesIt should also put that number in the innerHTML of the paragraph on the bottom of the page.Go back to the takeTurn function. In it, every time the function is called, the numGames variable should go down by 1 and the new value should go in the paragraph at the bottom of the pageYou are done if the button set the number at the bottom of the page, and clicking rock, paper, or scissors, reduces that number by 1 each time.
Create a program that prompts you for two numbers (positive or negative values should be possible), multiplies them and then adds a third number that also must be entered.
Accept three numbers from the user and display the second largest number.
Make the following variables (all of them should be OUTSIDE OF EVERY FUNCTION ON TOP OF MAIN.JS), along with the variables I left for you containing images: num1 a random number between 0 and 9num2 a random number between 0 and 9num3 a random number between 0 and 9totalGuesses start it with a 0use randomInt()define a function and attach it to your button (and/or to the user hitting the enter key). Call it makeGuess. This function should:find what the user typed in the inputs for each number, store it in a variable called userGuessclear the inputsalert all three of the user numbers so you can see it is workingYou are done when the alert in the function works correctly
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.