More pages on VS code for one website

Hi all,

I’m really new to coding and this is probably a really obvious question. On VS code, I’m making my own photography portfolio website as side practice to going though the full stack developer career path. What im confused with though is, specifically on VS code, how do you create seperate pages to the same site?

It may have been covered in one of the lessons but i dont remember it. Is it that you create a sperate “tab” within VS code but still within the same project and just link that or is it something else?

Any help would be greatly appreciated.

Thanks!

Hi there!

Welcome to the forums!

To create a new page, you will need to create a new file in your project directory and have it linked somewhere accessible (probably in the navigation)

You can create new files with the command line, or you can click on the “New File…” button that appears on the name of your directory:

image

Then you would need to name the file with a .html extension. e.g., about.html

Next, you will need to create a hyperlink to the page with the appropriate pathing.

For example, if your directory looked something like:

v your-project
  > resources 
    index.html
    about.html

Inside your index.html would be an <a> tag to the page.

<a href="./about.html">About Me</a>

If you need any clarification or have any other questions, please feel free to ask. :slight_smile:

I hope this helps!

2 Likes

Thank you for this, that actually really helps me :blush: much appreciated!

2 Likes

Hey @ruby9281931939 , if you’re sure @kirativewd’s explanation solves your problem, please click the “Solved” buttom on the bottom right of her reply.

Best of luck, peace out! :grin::+1:

-@olidaholi