Home »
MCQs »
jQuery MCQs
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?
- $("#p").append("Text to be added");
- $("p").before("Text to be added");
- $("p").append("Text to be added");
- $("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");