Which is the correct jQuery statement to set background color and text decoration to all <p> elements?

82. Which is the correct jQuery statement to set background color and text decoration to all <p> elements?

  1. $("p").css({"background-color": "#f1f1f1"; "text-decoration": "underline"});
  2. $("#p").css({"background-color": "#f1f1f1"; "text-decoration": "underline"});
  3. $("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});
  4. $("#p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});

Answer: C) $("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});

Explanation:

The correct jQuery statement to set background color and text decoration to all <p> elements is:

$("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.