How do you make a new page after clicking a button? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do you make a new page after clicking a button?

I can go onto a new page but it is blank. I am unsure of how to do this.

2nd Jan 2022, 6:37 AM
Rhia
4 Answers
+ 5
Can you attach a link to your code? it helps others to understand your situation better ... https://www.sololearn.com/post/75089/?ref=app
2nd Jan 2022, 7:04 AM
Ipang
+ 4
I see you have used "newpage" there for href value. I think you need to use a valid URL there, and "newpage" isn't one. A hyperlink cannot create a new page, it only takes you to a designated URL set in its 'href' attribute. Did I get what you mean by "new page" correctly? if not, maybe you can tell some more about your actual intention.
4th Jan 2022, 8:12 AM
Ipang
+ 2
What you want to do is to open a URL in a new tab? If yes, you can use target="_blank" in your <a> tag.
4th Jan 2022, 8:19 AM
Artem 🇺🇦
Artem 🇺🇦 - avatar