Applet is not showing in Browser

Following is my Java code. I compiled in to the class extension and attached to my HTML file. both HTML file and class files are located in the same directory. But the problem is that when I run it, the browser doesnt show anything. What is wrong with this code:

HTML Code:

<html><head><title>Hello World</title></head>
<applet code = "HelloApplet.class" width="150" height="100">

Java Code:

import java.awt.*;
import javax.swing.*;

public class HelloApplet extends JApplet{
    public void paint(Graphics g){
        g.drawString("Hello World", 30, 30);