JavaScript
var elem = $("#myElement1");
Html
<html>
<!-- heading -->
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<!-- page -->
<body>
<!-- connect the library jQuery -->
<script src="https://dir.by/example_lib/jquery/jquery-3.3.1.min.js"></script>
<!-- HTML Elements -->
<div id="myElement1">
Hello
</div>
<!-- JavaScript -->
<script>
// the page has opened
$( function()
{
// looking for an element by ID
var elem = $("#myElement1");
// show the item on the screen
alert(elem.html());
});
</script>
</body>
</html>