There are two "simple" things you can do:
1) Javascript (actually that's fairly simple). This is "client-side" programming because you merely give the javascript to the client's web browser and the browser is responsible for running the code...I wouldn't consider javascript "actual programming code" though.
2) JSP (Java Server Pages). Here you can embed java code in an HTML document. This would be considered "server side" programming.
The problem with JSP's is that they aren't nearly as simple as anyone makes them out to be. It helps a little to understand how a JSP works:
What happens with a JSP is that your web-server parses the .jsp page which will look, for the most part, like a normal HTML page, except that it will have Java code sprinkled in. The web-server finds those bits, converts the page to a servlet, then when a client makes a request for the web page, the servlet is called...OK, so what does that mean?
What it actually means, is that the .jsp page is used to generate Java code, which, in turn, is generally used to generate "dynamic" content (i.e. content that might change everytime the client requests the page).
For instance, you can write a JSP to display the current time...the code might look something like this:
<%= System.currentTimeMilli() %>
So what happens, is that when a request is made to the web server, it will call this function, get the String value, then generate an HTML page that has that info in it...so if you were to look at the source returned by such a request, it would look like this:
654321987654
So, to the client, it doesn't even appear like anything special happened, it just looks like a normal HTML page...and that's because that's EXACTLY what JSPs offer, they offer a way of dynamically generating HTML pages (using Java code).
So what's the catch? The catch is that you HAVE TO HAVE A WEB-SERVER capable of handling/translating JSP pages. Furthermore, you have to know HOW to use this function with your web-server.
Google: "JSP tutorial" for further info
(notice that you will also need to know what web-server you are using and will have to find the documentation on how to use JSP with your web-server)
Edit:
If you want to see how to write your own web-server, then you can check out my tutorial on creating a web-server in Java using the HttpServer class:
http://bennatt.no-ip.org/jwserver
(if the link is dead it means my computer must have shut down and I haven't restarted my server).
I don't really explain anything all that interesting unfortunately, but using what I did, you can easily encorporate custom content if you understand the HttpExchange process (i.e. the HTTP protocol). For instance, I have an applet which is capable of reading a picture from your computer, which, generally speaking SHOULD be impossible with an Applet.
But because I actually have you upload the picture to my server (which it turns out is fairly difficult), then I dynamically generate an html page which has the Applet embedded in it AND I give the Applet a parameter which points to the URL of the picture you just uploaded.
http://bennatt.no-ip.org/picture.html
So if you look at the source after you upload the picture you will see where I dynmically generated the URL...this is essentially the same thing that a web-server would do with JSPs.