The answer is applet
An applet is a fully functional Java application that is usually embedded within a HTML page and runs in a web browser. It has the entire Java API at its disposal and extends the java.applet.Applet class. Its class provides the standard interface between the applet itself and the environment of the browser.