1. TTfile
  2. HTML File
  3. How to Create HTML Files?

How to Create HTML Files?

1

It’s worth noting that so far you have followed exactly the same steps as you would if you were creating a Java application. The applet has been created and saved in a text file, and it has been compiled by the javac compiler.

Java Applets differ from Java applications when it comes to running them. What’s needed now is a web page that references the FirstApplet.class file. Remember, the class file is the compiled version of your applet; this is the file your computer can understand and execute.

Open up Notepad, and type in the following HTML code:

2

Save the file as “MyWebpage.html” in the same directory as your Java applet files.

This is the most important line in the webpage:

3

When the web page is displayed, it tells the browser to open up your Java applet and run it.