Homework Help Question & Answers

use the sample html file below with a submit button to modify the style of the...

use the sample html file below with a submit button to modify the style of the paragraph text through JavaScript code. By clicking on the button, the font, the font size, and the color of the paragraph text will be changed.

<!DOCTYPE html>

·         <html>

·         <head>

·         <meta charset=utf-8 />

·         <title>Change Paragraph Text</title>

·         </head>  

·         <body>

·         <p id ='text'>I’m going to change this text, I hope.</p>  

·         <div>

·         <button id="jschange"

·         onclick="js_style()">Style</button>

·         </div>

·         </body>

·         </html>

0 0
Add a comment
Answer #1

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<script type="text/javascript">
function change_para_style()
{
text.style.fontSize = "20pt";
text.style.fontFamily = "Comic Sans MS";
text.style.color = "blue";
}
</script>

<title>Change Paragraph Text</title>
</head>
<body>
<p id ='text'>I'm going to change this text, I hope.</p>
<div>
<button id="jschange"
onclick="change_para_style()">Style</button>
</div>
</body>
</html>

Add a comment
Know the answer?
Add Answer to:
use the sample html file below with a submit button to modify the style of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coin

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
  • HTML css When i refresh the page, the picture doesnt move at all for #i1 i...

    HTML css When i refresh the page, the picture doesnt move at all for #i1 i have width and height but the pictuers doesn't move please fix it. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> <style> body{ background-color:#FFA07A; } #h1{ color:white; text-decoration:none; padding:30px; } #h2{ color:white; text-decoration:none; padding:30px; } #navbar1{ background-color:grey; text-align:center; font-size:35px; height:100%px; border:1px solid black; position:absolute; text-decoration:none; margin-left:300px; } #h3{ color:white; text-decoration:none; padding:30px; } #b1{ background-color:grey; font-size:30px; } i1{ width:10px; height:20px; } </style> <body> <div...

  • <!-- DOCTYPE declaration --> <!DOCTYPE html> <!-- HTML boilerplate code --> <html lang="en">    <!-- head...

    <!-- DOCTYPE declaration --> <!DOCTYPE html> <!-- HTML boilerplate code --> <html lang="en">    <!-- head tag -->    <head>                 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Personal Webpage</title>    </head>    <!-- body tag -->     <body>             <style>        .sidenav {            height: 100%;             width: 160px;            position: fixed;            z-index: 1;             top: 0;            left: 0;           ...

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

  • Javascript to edit a HTML file. Where to begin? <!doctype html> <html>    <head>      <meta charset="utf-8">      <title>TODO:...

    Javascript to edit a HTML file. Where to begin? <!doctype html> <html>    <head>      <meta charset="utf-8">      <title>TODO: Change The Title</title>    </head>    <body>      <h1></h1>      <p>First paragraph.</p>      <p class="intro">Second <span>paragraph</span>.</p>      <button id="start">Start</button>      <main> </main>      <!--       Test 6: DOM Programming       You MAY consult the notes for week 7, but you MAY NOT discuss this test or       your code with any other students.  All work must be your own.       Instructions:              1. Put all solution code in a file named solution.js.  When you upload your          solution to...

  • <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 4 Hands-on Project 4-3 Author: Da...

    <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 4 Hands-on Project 4-3 Author: Date:    Filename: index.htm --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Hands-on Project 4-3</title> <link rel="stylesheet" href="styles.css" /> <script src="modernizr.custom.05819.js"></script> </head> <body> <header> <h1> Hands-on Project 4-3 </h1> </header> <article> <div id="results"> <p id="resultsExpl"></p> <ul> <li id="item1"></li> <li id="item2"></li> <li id="item3"></li> <li id="item4"></li> <li id="item5"></li> </ul> </div> <form> <fieldset> <label for="placeBox" id="placeLabel"> Type the name of a place, then click Submit: </label> <input type="text" id="placeBox"...

  • trying to get this html to calculate tax values, useing a js library file,    <script...

    trying to get this html to calculate tax values, useing a js library file,    <script type="text/javascript"> { var number; function Icometace(income, itemized) // Assynes: income .=0, itemzed .=0 // Returns: flat tax (13%) due after deductions { var deduction, taxableIcome, total tax; deduciton= Math.max(itermized, 4150): taxableIncome = Math.max(income - debuction, o); toatltax = 0.13*tableTincome return totaltax; } *^js code***\/ html code* <html> <head> <title> taxes </title> <script type="text/javascript"> { var number; function Icometace(income, itemized) // Assynes: income .=0, itemzed...

  • finished the web page ********************************************************* .js // I've added a span with the id "count" which...

    finished the web page ********************************************************* .js // I've added a span with the id "count" which you can use to modify // the number of clicks on the page // you can do this by getting the value; incrementing it and then // modifying the value of the span function changeColor(){     const colors = ['red', 'green', 'blue', 'cyan', 'yellow', 'black', 'silver', 'tan'];     // Choose a random float from [0, 1) the multiply by length to get random index     // Math.floor()...

  • HTML /CSS when you run the code, there will be a picture and some text in...

    HTML /CSS when you run the code, there will be a picture and some text in the left side. I want a copy of that text and picture in the right side without it affecting anything in the left side. The rest of the page should remain the same, but there should be text and image in the right side. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> <style> .btn-group button { background-color: #4CAF50; /* Green background */...

  • In the DOM of the HTML document of the previous question (included again below), which of...

    In the DOM of the HTML document of the previous question (included again below), which of the following statements is FALSE? <!DOCTYPE html> <html> <head> <title>Question 4</title> <style> body em { font-size: 1.4em; color: yellow; } р { color: blue; font-size: 1.2em; font-family: arial, sans-serif; } #q7 { color: green; } </style> </head> <body> <p>The magician said <em id="q7">abracadabra</em>, and the exam disappeared...</p> </body> </html> O the <html> element has 2 children the grandfather of the <title> element is <html>...

Free Homework 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.