Get the HTML content of <p>. - Javascript jQuery

Javascript examples for jQuery:Tag Edit

Description

Get the HTML content of <p>.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    console.log($("p").html());
});//  w ww.  j a  v  a  2 s .c  om
</script>
</head>
<body>

<p>This is some <b>bold</b> and <i>italic</i> text.</p>

</body>
</html>

Related Tutorials