Ask coding questions

← Back to all posts
Multi Page Website
h
K1NGBOSS (12)

Hey I'm a noob at this and im trying to make a multi page site for a project can someone help me out?

Answered by GavHern (92) [earned 5 cycles]
View Answer
Comments
hotnewtop
GavHern (92)

Yes! You're going to want to create multiple HTML files. If you don't know how to do that:
https://storage.googleapis.com/replit/images/1557772793791_ddc449a63d9bb56fd8417d5b578fe5fb.pn

https://storage.googleapis.com/replit/images/1557773264025_e5feb7f4857936ea54a9265f67dddc4e.pn

Now, to allow the user to switch between files, we are going to use hyperlinks. This is using the <a> tag. It will look like this:

<a href="YOURFILENAME.html">My Link</a>

This will add "My Link" to your page as a link that you can click to redirect to "YOURFILENAME.html".

The rest of this is a bit more advanced if you're just trying to add more files.

Keep in mind that if you would like to use folders, you'll have to do href="foldername/filename.html" to tell the browser to go to the folder.

If you want to link from inside a folder to something out of a folder, use href="../filename.html". The .. will go back a folder. (If you're in folder1/folder2/page.html you will leave folder2 and go back to folder1)

Hope this clears it all up for you! Consider marking this as the answer if it helped!

Geocube101 (627)

Just add a link to the website
Links: <a href="url">Link Text</a>