Solved

Joshua Has Created a Web Page and Implemented CSS in It

Question 42

Multiple Choice

Joshua has created a web page and implemented CSS in it. He has applied the style property to inline styles that can also be used with style rules and with style sheets. However, he wants to change a CSS rule in the stylesheet from h2 { color: blue; } to h3 { color: green; font-size: 1.2em; }


A) document.styleSheets[0]. cssRules[1].selectorText = "h2"; document.styleSheets[0]. cssRules[1].style.color = "blue"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
B) document.styleSheets[1]. cssRules[0].selectorText = "h3"; document.styleSheets[1]. cssRules[0].style.color = "green"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
C) document.styleSheets[1]. cssRules[0].selectorText = "h2"; document.styleSheets[1]. cssRules[0].style.color = "blue"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
D) document.styleSheets[0]. cssRules[1].selectorText = "h3"; document.styleSheets[0]. cssRules[1].style.color = "green"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents