Your code actually does work (even without the missing html closing tag :-P) but only if it is run from a server. It is all to do with the URI for the jQuery file.
If you run the file locally, the browser guesses that it should download the file using the file protocol, so:
file://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
If you open up your browser's developer tools (by pressing the F12 key usually), it should show you an error saying the browser couldn't load the jQuery file from a file:// URL. If you put http (or https) as the protocol, it knows where to get jQuery from and everything works.
Interestingly if you run the file on a server (which I guess is what w3schools intended) then the browser guesses it should be the http or https protocols and it finds the jQuery file.
If you want to experiment running a webserver without putting in much effort, Python (because it is awesome) lets you run a web server with just one command:
python -m SimpleHTTPServer
It runs the server on:
http://0.0.0.0:8000
and serves the files from the directory where you run it. This url has a little more detail about it: http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python
I wasn't aware of the server requirement (thanks for the question!) and I found this in my travels which I thought was interesting. It talks about how the missing protocol is valid html StackOverflow: Is it valid to replace http:// with // in a script tag?