0

Navigation

How can I navigate on my page. Example when you press “login” you are navigated to another place on the page. Can someone please learn me how to do that? I’m struggling with my page. It’s called Bnak3 if you want to see it. Any ways I wanna create a button that takes you to another place on the pages like if you press “login” Thank you. Btw if i misspelt something please tell cause I’m a Dane and I’m also learning English right now. So just tell me if I made any mistake Thank You.

7th Oct 2018, 8:51 AM
Alexander R. Storr-Hansen
Alexander R. Storr-Hansen - avatar
7 Answers
+ 3
Providing link to Bnak3 project for the benefit of those reading this thread: https://code.sololearn.com/WXKj6mH7dOTj/?ref=app Thus far, there doesn't seem to be a login button, so if you just want something that takes you to another spot on the same page, you can style an anchor to look like a button. Referencing the "HTML Links - Create a Bookmark" section: https://www.w3schools.com/html/html_links.asp (I think referring to them as "bookmarks" can be a bit misleading, but anyway...) Down the road, you will want to learn a back end language so you have a way to store the user information in a database (and all the other things you would expect from being able to create an account), but that can wait until after you have a solid foundation in the basics.
7th Oct 2018, 10:20 AM
Janning⭐
Janning⭐ - avatar
+ 2
The anchor tag is more generally used to retrieve an external document (i.e. a separate file). For it to work in the Code Playground, the separate file needs to be hosted (i.e. not another Code Playground project unless you don't mind it jumping to the code instead of the content directly and the Code Playground doesn't support multiple files in the same project). With JavaScript, you can write an onclick event listener to call a function (that presumably would start the game or whatever), but I would recommend finishing the CSS course and taking the JavaScript tutorial first.
7th Oct 2018, 10:46 AM
Janning⭐
Janning⭐ - avatar
+ 2
Happy to help. 🙂
7th Oct 2018, 11:05 AM
Janning⭐
Janning⭐ - avatar
+ 1
Thank you. i apreciate it. i will finish my css course and start a Java course after that. Thank you again :)
7th Oct 2018, 10:51 AM
Alexander R. Storr-Hansen
Alexander R. Storr-Hansen - avatar
0
Ok
7th Oct 2018, 10:26 AM
Alexander R. Storr-Hansen
Alexander R. Storr-Hansen - avatar
0
Ok but how can i then make a button that takes me to another document or do something on the page. exemple you are in a game and press “Start”. it takes you to the actual game.
7th Oct 2018, 10:29 AM
Alexander R. Storr-Hansen
Alexander R. Storr-Hansen - avatar
0
👍
7th Oct 2018, 11:32 AM
Alexander R. Storr-Hansen
Alexander R. Storr-Hansen - avatar