File > Open Folder
tagsused to "markup" the text. The tags indicate to the browser what type of content the contained text is. For example, our
h1tag tells the browser that we are dealing with a Level 1 Heading, and the
ptag indicates that we are working with a paragraph. The current HTML5 standard includes around 150 tags, but a lot of them are very niche, and you certainly don't need to remember each and every one. For a good reference about different tags, look here
ptag, but before the closing
bodytag, add the following:
scripttag, it will run all the code contained within before continuing on. Because of this, we tend to put the script tags at the bottom of the page most of the time, so that they won't slow down the loading of the page too much.
console.log is a function which tells the browser to display some information in the dev tools console. this is super hand for debugging issues and check whats what as you write your code. To see the fruits of you labour, right click somewhere on your page, and select
inspect. In the new window that pops up, go to the
consoletab, and you should see the output of your script.
alertso that the contents of your script tag reads like
script.jsand move the contents of your script tag into this file.
<!--and end with