You implement an application by using HTML5 and JavaScript. You create a webpage that contains the following HTML:
The application must place a border on only the first UL element that is contained in the DIV element.
You need to update the webpage.
What should you do?
A. Option A
B. Option B
C. Option C
D. Option D
The correct answer is B.
The correct answer according to the given selection is: B
$(“div#container > ul”).css(“border”, “1px solid black”);
not A: the code places a border around all UL elements.
not C: the code places a border also around all UL elements.
not D: the style addresses visibly a class, so it never accesses the DIV element which has no class attribute.
Every answer tested with jsfiddlet.net