HTML Element <applet> Example

The HTML element <applet> is used to embed a Java applet into an HTML document.

An applet is a mini Java application that can be included within an HTML page, similar to the way an image is included.

Here is an example that explains the element in action. Click the below link to see the live demo.

Run this on IDE

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Example - HTML Element applet</title>
</head>
<body>
    <applet code="Sample.class" width="400" height="300">
        <param name="delay" value="30">
        <param name="time" value="120">
    </applet>
</body>
</html>

Related Links