Which is the correct syntax to insert content at the end of the <p> elements?

68. Which is the correct syntax to insert content at the end of the <p> elements?

  1. $("#p").append("Text to be added");
  2. $("p").before("Text to be added");
  3. $("p").append("Text to be added");
  4. $("p").prepend("Text to be added");

Answer: C) $("p").append("Text to be added");

Explanation:

The correct syntax to insert content at the end of the <p> elements is:

$("p").append("Text to be added");

Comments and Discussions!

Load comments ↻






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