Creating more files
Intro
For our next lesson, we’re going to need one more HTML file because we need another page on our site. So far we’ve only been working with an index.html
file, which means we only have one page on our site, a home page.
But to add another web page, we’ll need to create another HTML file. In this example, we’ll create an About page.
Steps
Create file
To create another HTML file, make sure you have your Explorer open. Then, click on the New File button.
Then, type about.html
in the textbox and press Enter. The file should automatically open up in your editor.
Add boilerplate
Type !
in the about.html
file and press Tab.
Change title
Change the <title>
element so it says About. Check the preview to make sure the browser tab says About.
Add heading
Next, put your cursor in between the <body>
tags, type h1
, and press Tab.
Lastly, type About in between the h1
tags.
If you check the preview, you should see the word About appear in big and bold letters. This is so we can tell the About page apart from the home page.
You can also edit the <title>
element to say About as well.
End
And that’s how you can create multiple HTML files.
Final code
If you’ve been following along so far, this is the code that should be inside the about.html
file.