With... a text editor?! Look up a HTML tutorial, e.g. on MDN. But you need a web page that embeds a Java applet. Which is 1) not the same thing and 2) not necessary, because Itch supports Java applets directly. Did you look in the list of project kinds when creating a new one?
How did you circle back to making an applet anyway? We were just talking about making it downloadable because most browsers don't support Java applets anymore. And you can't get around that with tricks.