nerdexam
Microsoft

70-515 · Question #68

70-515 Question #68: Real Exam Question with Answer & Explanation

The correct answer is A. <ul id="color">. See the full explanation below for the reasoning.

Question

You create a Web page that contains the following code. (Line numbers are included for reference only.) 01 <script> 02 function changeColor(c) { 03 message.style.color = c; 04 } 05 </script> 07 <p id="message">Welcome!</p> 08 <ul id="color"> 09 <li>Black</li> 10 <li>Red</li> 11 </ul> You need to ensure that when the user clicks an item in the list, the text color of the "Welcome!" message will change. Which declaration should you use?

Options

  • A<ul id="color">
  • B<ul id="color">
  • C<ul id="color">
  • D<ul id="color">

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice