Q:

How to execute a simple jQuery Program?

i have created a simple jQuery program.i am new to jQuery technology..please provide me where am i wrong?
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"
      >
 <html lang="en">
<head>
<title><!-- Insert your title here --></title>
<script type="text/javascript" src="jquery-1.4.2.min.js">
     $(document).ready(function() {
      alert("jQuery tutorial for beginners Example");
       });
</script>
</head>
<body>
<p> i m here hid me</p>
<!-- Insert your content here -->
</body>
</html>

A:

The script you've written isn't supposed to go inside the jquery script tag. It needs to go in its own one.
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>

<script type="text/javascript">
 $(document).ready(function() {
      alert("jQuery tutorial for beginners Example");
       });
</script>

The first one is to load jquery itself - it's like saying "instead of me writing some javascript here, load it from this file instead", the second one is for your own code since you've put code between the script tags.

