This quick tip shows you how to create a HTML and scripting shell. Overall, you will need to use this shell when you create programs with us.
The HTML Shell
In a code editor, type in everything you see in the above code listing. We use Visual Studio Code for most of our programming.
Brief Overview of the HTML Shell
- Line 1 – Specifies the type of document we are creating, which is an HTML document.
- Line 2 – The HTML tag is the root of an HTML document. All HTML tags are enclosed inside this tag.
- Line 3 – The head tag contains meta data, links, scripting code, and the title tag.
- Line 4 – This meta tag specifies the character set. UTF-8 is the code that is very common with HTML documents.
- Line 6 – You should always give your document a title, which shows up in the browser tab.
- Line 8 – The body is where we place the content for our document.
Saving Your Document
When you save your document, make sure you save it as an HTML document. Sometimes, the editor will default to another format, such as plain text.
In our case, we named our file html_shell.htm. As you see in the Save as type options, you can also use the extension .html.
Add the Scripting Component
Note: On line 9, you do not need to include the type attribute. It could just be <script>.
Also, if you want, you can change the title of the document, as we did on line 6.
Save your file again.
Going forward, this will be the file you will use as a starting point for creating programs with us.