Based on the following code, write one line JS code that can be placed inside "script" tag to change the color of paragraph "Hello World "to blue. JavaScript HTML DOM Changing the HTML style: Hello World! Hello York

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter9: Getting Started With Javascript: Creating A Countdown Clock
Section: Chapter Questions
Problem 11CP1
icon
Related questions
Question

 

 

Based on the following code, write one line JS code that can be placed inside "script" tag to change the color of paragraph "Hello World "to blue.
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript HTML DOM</h2>
<p>Changing the HTML style:</p>
<p id="p1">Hello World!</p>
<p id="p2">Hello York</p>
<script>
</script>
</body>
</html>
Transcribed Image Text:Based on the following code, write one line JS code that can be placed inside "script" tag to change the color of paragraph "Hello World "to blue. <!DOCTYPE html> <html> <body> <h2>JavaScript HTML DOM</h2> <p>Changing the HTML style:</p> <p id="p1">Hello World!</p> <p id="p2">Hello York</p> <script> </script> </body> </html>
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning