2. Inserting elements


#1


The console is displaying the paragraph...but it says "Oops, try again. Make sure to use the .append() jQuery function to add your <p> to the body of your HTML document."
Whats wrong?


(document).ready(function() {
$("<p>I'm a paragraph!</p>").appendTo($("body"));
});


#2

The event is .append() not .appendTo

Also first you choose the location then you append the element.

Example:

$("div").append("<br>");

#3

ok thanks...i already figured it out tho :neutral_face:


#4

Great :slight_smile:


#5