1<!DOCTYPE html>
2<html>
3<head>
4<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
5<script>
6$(document).ready(function(){
7 $("#btn1").click(function(){
8 alert("Text: " + $("#test").text());
9 });
10 $("#btn2").click(function(){
11 alert("HTML: " + $("#test").html());
12 });
13});
14</script>
15</head>
16<body>
17
18<p id="test">This is some <b>bold</b> text in a paragraph.</p>
19
20<button id="btn1">Show Text</button>
21<button id="btn2">Show HTML</button>
22
23</body>
24</html>
25