Applets are falling into disuse:
Java is not embedded in some browsers and no, as far as I know, mobile device (phones, tablets) browsers.

Comment at Stack Exchange Blog.
"As a veteran of applet development (see credentials below), I think it is high time to make a call that teachers should stop teaching applets in general, & especially AWT (Abstract Windowing Toolkit) based applets. Applets are an advanced and specialized type of app. that has little place in the real world around us (most things that are done by applets can instead be better achieved using Javascript, HTML 5 and swing).
Swing, a GUI widget toolkit for Java, is more popular now. See Swing.

Note:
You may get a prompt saying the plug-in is missing or not allowed in your browser or you need to download java.

With recent security issues involving the JRE (java runtime environment), Apple has added a few layers of protection to prevent local Java Applets from running in a browser

On the Mac I had to go to the Java Control Panel from Java in System Preferences Go to Security and change the Security level from "Very High" to "High" and put https://donsnotes.com in the Exception Site List. Check "Enable Java content in the browser". Applets work in Safari and Firefox but not in Chrome. Test for JVM Chrome no longer supports the Netscape Plugin Application Programming Interface (NPAPI).

See also Running Local Java Applets on a Mac - Intertech Blog


How does the java applet get from the server, where this html code resides, to your computer?
The Java Remote Method Invocation (Java RMI) is a Java API that performs remote method invocation, the object-oriented equivalent of remote procedure calls (RPC).

See Dynamic code downloading using Java RMI | orace.com



See: How do I enable Java in my web browser? | java.com
and How do I enable Java through the Control Panel? | java.com or Enable Java in Your Browser - Ingenuity Systems

Running a Java Applet
On Mac OS X - Created with Java Version 8 (Update 73)

I spent several days and never could get this to work.

 

You should see an "Enter Name" prompt if it's working.


Try also Java applet test with applet and object | w3.org

The html looks like this
<!DOCTYPE html>
<html>
<body>
<applet code="HelloApplet.class"
 codebase="https://donsnotes.com/cgi-bin" 
 WIDTH="200" HEIGHT="100">
You should see a "Enter Name" prompt if it is working.
</applet>
</body>
</html>

Links:
Verify Java Version
Java Downloads for All Operating Systems | Java.com
Java SE - Downloads | Oracle Technology Network | Oracle.com

last updated 23 Mar 2016