Below you have some VALID html5 example document. The type
attribute in script
tag is not mandatory in HTML5.
You use jquery by $
charater. Put libraries (like jquery) in <head>
tag - but your script put allways at the bottom of document (<body>
tag) - due this you will be sure that all libraries and html document will be loaded when your script execution starts. You can also use src
attribute in bottom script tag to include you script file instead of putting direct js code like above.
<!doctype html>_x000D_
<html lang="en">_x000D_
<head>_x000D_
<meta charset="utf-8">_x000D_
<title>Example</title>_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>_x000D_
</head>_x000D_
<body>_x000D_
<div>Im the content</div>_x000D_
_x000D_
<script>_x000D_
alert( $('div').text() ); // show message with div content_x000D_
</script>_x000D_
</body>_x000D_
</html>
_x000D_