Microsoft
70-515 · Question #64
A Web page includes the HTML shown in the following code segment. <span id="ref"> <a name=Reference>Check out</a> the FAQ on <a information: </span> You need to write a JavaScript function that will…
The correct answer is D. $("#ref a[href]").css({fontWeight:"bold"}). See the full explanation below for the reasoning.
Question
A Web page includes the HTML shown in the following code segment. <span id="ref"> <a name=Reference>Check out</a> the FAQ on <a information:
</span> You need to write a JavaScript function that will dynamically format in boldface all of the hyperlinks in the ref span. Which code segment should you use?
Options
- A$("#ref").filter("a[href]").bold();
- B$("ref").filter("a").css("bold");
- C$("a").css({fontWeight:"bold"});
- D$("#ref a[href]").css({fontWeight:"bold"});
How the community answered
(60 responses)- A3% (2)
- B15% (9)
- C7% (4)
- D75% (45)
Community Discussion
No community discussion yet for this question.