Now to see this all in action.
I'm again, back in an empty project folder,
I have this gitignore file, which
I mentioned before already helps me create code snapshots.
You won't have that and you don't need it.
And in this empty folder,
which I did open in visual studio code here,
I will create a new index HTML file.
And in this index HTML file,
I will create a brand new HTML skeleton
by entering an exclamation mark,
and then in this auto overlay, which I get here,
I hit tab to automatically create this skeleton.
And here I'll just give this a title of JavaScript
introduction. And now for the moment,
we actually won't add any meaningful HTML content.
Instead for the moment,
I just want to start with some JavaScript code
and how we can include it in our HTML file.
And that's actually the first thing I want to do.
How can we now add JavaScript code to this project here
to this HTML page?
Now there are different ways of doing it,
but the most straight forward
and easiest way of adding JavaScript to HTML file
is to add a special script HTML element,
opening and closing, you need both tags.
This is not a self-closing tag,
and it's not a self-closing tag because there is content
which you can put between those tags
and that content would be the actual JavaScript code.
So that's very similar to the style
tags we learned about earlier in the course,
where we put CSS code between those tags.
Now we have the script tags
and we put JavaScript code between those tags,
quite straightforward.
Now, when it comes to the placement of that script element,
it's basically up to you.
For the style tags, I strongly recommended
that you put those into the head section.
For JavaScript, I basically have the same recommendation,
but you will also, quite frequently see it
being added in the body.
It's up to you, but it is worth mentioning and highlighting
that like style,
script won't render anything visible on the screen.
So putting it into the body
doesn't make a lot of sense from that perspective.
And hence here,
I'll actually also put it into the head section.
Now, but we know script tags, as I mentioned,
we can write some JavaScript code.
And to get started
let's practice working with variables and values.