Q:

Create a paragraph element with some text and append it to the end of the document body using jQuery

0

Create a paragraph element with some text and append it to the end of the document body using jQuery.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

HTML Code:

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Create a paragraph element with some text and append it to the end of the document body using jQuery.</title>
</head>
<body>
<p>jQuery</p>
</body>
</html>

JavaScript Code :

$( "p" ).add( "<span>Exercises</span>" ).appendTo( document.body );

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now