PrepAway - Latest Free Exam Questions & Answers

Which code segment should you add to the webpage?

You develop an HTML5 webpage. You have the following HTML markup:

You need to add a background color to the first article in each section.
Which code segment should you add to the webpage?

PrepAway - Latest Free Exam Questions & Answers

A.
$ (“section article:first-child”).css(“background-color”, “#f2f2f2”);

B.
$ (“section:first-child”).ess ( “background-color”, “#f2f2f2”);

C.
$ (“article:first-of-type”) .css(“background-color”, “#f2f2f2”);

D.
$ (“section:first-of-type”).css(“background-color”, “#f2f2f2”);

7 Comments on “Which code segment should you add to the webpage?


Leave a Reply