An HTML Application (HTA) is a Microsoft Windows program whose source code consists of HTML, Dynamic HTML, and one or more scripting languages supported by Internet Explorer, such as VBScript or JScript.
To begin we will create a simple webpage.
If you have never created a webpage before you may wish to take our
Beginner HTML course.
Another option is either our FrontPage or
ASP courses.
Create a new file with the extension of .html. Let's call it Simple.
<!DOCTYPE html>
<html lang="en">
<head>
<title>A Simple Webpage</title>
</head>
<body>
<h1>Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
A simple page:
To make this a into an Application we just need to change the file extension to .hta and add a new tag <HTA:APPLICATION />.
This can contain many attributes and must appear in the <head> of the page.
<!DOCTYPE html>
<html lang="en">
<head>
<title>A Simple HTA Application</title>
<HTA:APPLICATION
APPLICATIONNAME = "A Simple HTA Application"
/>
</head>
<body>
<h1>Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
You can add an Icon to make it look a litte more professional. Just add the ICON to the same folder that the HTA is in.
If it's in another folder just change the path.
As you can see the URL bar and navigation buttons are missing. The Title has moved to the top of the Application and there is a scrollbar showing (disabled).
As this is a webpage you can add any HTML controls you are familar with, these will be convered in the next lesson.
You may receive a warning when you open a .hta as it can contain malicious code so be careful and only open trusted files