# Creating An HTML/JS/CSS Instrument
In this short tutorial we'll quickly go over the basics required from you to create a new glass-cockpit package that will be used in a single aircraft in the simulation. In this case you will be making a new instrument that will take the place of the **Backup Speed Display** that is used in the [DA62 sample project](../../../samples-tutorials/samples/simobjects-aircraft/da62/).
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_7_da62speedgauge.png"
alt="The Backup Speed Display In The DA62" >}}
You are going to make an instrument that will simply display some text that says "Hello World!".
{{< callout context="note" title="NOTE" icon="outline/bulb" >}}
This tutorial assumes you have followed the steps outlined on the page [Setting Up For HTML/JS/CSS Instruments](setting-up-for-html-instruments/) to create the instrument package that you will be using to replace an existing gauge.
{{< /callout >}}
### Create The Instrument Package
To start with, you will need to open the [DA62 sample project](../../../samples-tutorials/samples/simobjects-aircraft/da62/) in the Project Editor. You will be using this as your base aircraft, so we recommend that you save the project using the **Save As** option (from the **Project** menu), so as not to change the SDK sample. Once you have the project open you can do one of two things:
- Create a new package for the instrument that you want to add.
- Import an existing instrument package and modify that so it's unique to the aircraft.
If you want to create a new package then follow the steps outlined here to create it *within* the DA62 project:
- [Setting Up For HTML/JS/CSS Instruments](setting-up-for-html-instruments/)
When finished you should have a single project with two packages in it, as shown below:
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_15_packages.png"
alt="Project With Two Packages Shown In The Project Editor" >}}
You can now move on to the section titled [Creating The Files](creating-js-instrument/#create_files), below.
### Importing An Instrument Package
In this section we'll explain how to import an instrument package that you have previously created and use that in the aircraft. For this example you'll be importing the package you created in the section on [Replacing An HTML/JS/CSS Instrument](replacing-js-instrument/) (if you haven't done this, then you should go and do it now).
To import the instrument, you need to click on the `Import Item` button in the **Project Editor**:
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_11_import.png"
alt="The Import Item Button In The Project Editor" >}}
This will open the **Import Item** window where you should do the following:
1. Click on the {{< button "..." />}} button to open the file explorer.
2. Browse to the **Package Definitions** folder for the test gauge package you made previously and select the package XML.
3. Click on the `Import Item` button.
{{< callout context="note" title="NOTE" icon="outline/bulb" >}}
The Import Item window will tell you if you have selected a valid package or not, so pay attention to the messages it has after selecting a file to import. The text should be **green**.
{{< /callout >}}
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_12_package_def.png"
alt="Importing The Base Instrument Package Into The DA62 Project" >}}
Once you have the package imported, select the asset group in the Project editor and open the **Inspector** (if it's not already open). You should see something like this now:
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_13_imported.png"
alt="The Imported Instrument Package In The Inspector" >}}
Currently this package is named to replace an existing instrument, so you need to edit the **AssetDir** folder so that it has a unique name and won't interfere with any existing gauges (you'll edit the **OutputDir** later). So, you will need to open a file explorer and navigate to the "mytestgauge" folder and rename the "BackupSpeedDisplay" folder to "**HelloWorldDisplay**". After doing that, click the {{< button "..." />}} button in the Inspector and select this new folder. You should also change the **Name** of the instrument to "**HelloWorldDisplay**". The end result should look like this:
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_14_testgauge.png"
alt="The Renamed Gauge With New Asset Path In The Inspector" >}}
Since the instrument already contains the files that you will need, you can skip the **Creating The Files** section, below, and go straight to [Modify The Output Directory](creating-js-instrument/#modify).
### Creating The Files
After creating your new package in the DA62 project, the next thing you'll need to do is create the base files. So, in your file explorer you need to navigate to the **PackageSources** instrument folder, specifically:
``` codeblock
PackageSources\Copys\mytestgauge\HelloWorldDisplay
```
Once you are in that folder location, you need to create the following three files:
- `helloworld.html`
- `helloworld.js`
- `helloworld.css`
Ensure that the files are named *exactly* as shown above, since they have to match the details you'll put in the HTML and JS files. You won't be doing anything else with these files right now, as first we want to go ahead and finish defining the folder structure for the project.
### Modify The Output Directory
For your instrument to be used in the DA62 sample aircraft we will need to change the the project folder architecture, as it **must use the output folder path required by Microsoft Flight Simulator 2024 for all VCockpit instruments**. This path is as follows:
``` codeblock
\html_ui\Pages\VCockpit\Instruments\[INSTRUMENT_FOLDER]\
```
Now, back in the Project Editor, select the "HelloWorldDisplay" instrument **asset group** in the package and ensure you have the **Inspector** open. In the Inspector you need to add in the relative path to the instrument using the above path schema. It should look something like this:
{{< image-center
src="images/6_Programming/JS/html_tutorial/tutorial_16_outputdir.png"
alt="The Changed Asset Group Path For Overwriting A Gauge" >}}
You can now go ahead and select the package then click on the `Build Package` button. If you go to the project folder and check in **Packages** you will see that the three base files have been copied to the correct location within the `html_ui\...\HelloWorldDisplay` folder.
### The Files
Now that you've set up the project and created the base files, we can start to edit them to contain the data that will be used to create your instrument. If you've imported a previously made instrument then you may not need to edit anything other than the [`panel.cfg`](../../../content-configuration/cfg-files/panel.cfg/) to reference the imported instrument HTML.
NOTE: If you've imported the gauge made with the [Replacing An HTML/JS/CSS Instrument](replacing-js-instrument/) tutorial, you *will* need to edit and rename each of the relevant files, as we do **not** want to overwrite an existing instrument, but instead create a unique one only for this aircraft.
#### helloworld.html
In Visual Studio (or your IDE of choice) you can open the file and add the following:
``` markup
```
This short chunk of HTML is the about as basic is gets to have a functional glass-cockpit. Let's briefly go over what we're doing here:
- The HTML needs to be inside of a `