Ask coding questions

← Back to all posts
How would you add a link to an HTML file on repl.
webmunchster

So I am trying to make a social media site, (one that would have more than one page), and I was wondering if there is a more efficient way to make separate pages and instead send destinations to other HTML files inside the repl. If this is obvious, I am sorry.

Answered by JustARatherRidi [earned 5 cycles]
View Answer
Voters
jaskaransingh14
LukeBlack2
webmunchster
Comments
hotnewtop
ArchieMaclean

If you have a page called about.html then you can link using the a tag like:

(Assuming a HTML/CSS/JS repl)
Please mark this as the answer if it solved your problem :)

webmunchster

@ArchieMaclean No, that des not help. Maye if I share the link it might help.
https://repl.it/@webmunchster/Arion

JustARatherRidi

@webmunchster Where in your page would you like your link to be?

webmunchster

@JustARatherRidi It will probably be a button in the top row

JustARatherRidi

@webmunchster Okay, so assuming you fix your about.html, maybe like so:

Then, on line 26 of index.html, you can change the href attribute to ./about.html, after which it will look like:

Doing that should make the profile button on the top navbar to redirect to about.html.

Working repl: https://repl.it/@JustARatherRidi/Arion

Hope this helped!

webmunchster
JustARatherRidi

@webmunchster No problem! And tough luck @ArchieMaclean :P