Why it no works? 3/2


#1

$('body').append('<p>I am a paragraph!</p>');

it says that no add the <p> tag to the <body> tag
why???


#2

Can you post your CODE here/


#3

You cannot just append text to the body it has to be paragraph or heading.


#5

$("body").append("<p>I\'m a paragraph!</p>");

@wichoe


#6

Because you didn't make the document active.
The code should be like this:

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

That will be Ok.