Note: that only works in Internet Explorer (not Edge, of course), since all other browsers have disabled support for NPAPI plugins, including Java. I guess it shouldn't be too hard to implement a JVM in JavaScript that's good enough to run simple applets like this, but sadly nobody is doing it.
"The applet viewer operates on HTML documents, but all it looks for is embedded applet tags; any other HTML code in the document is ignored. Each time the applet viewer encounters an applet tag in an HTML document, it launches a separate applet viewer window containing the respective applet."
As far as security goes, I don't think appletviewer claims to be more secure that the browser. It has a similar security policy/sandbox.