Code not working. Please help
In the file contact.html i put a button link called go back to main page and gave the link as index.html:
<button class="GFG" onclick="window.location.href = 'index.html';"> Go Back to main page </button>
This is the code but it is not working.
Please help
Voters
FishballNooodle
Sure about this
But you can create an [ tag and remove the text decorations, add border and it will look like a button.
Then you can use href="index.html"]
DreamyStars
sure will try @FishballNooodle
FishballNooodle
@Satkrithi
text-decorations:None
border : 10 5 10 5
border-radius: 10px
DreamyStars
@FishballNooodle are you sure? I have tried doing it but it is still not working
Coder100
It is not working because some of your pages don't have any code.
For example, Thank you contact.html
and Topics.html
.
DreamyStars
@Coder100 In that case, it would show blank page but here it is showing page not found.
Don't do a button; use a link - you can style one to look like a button, something like this CSS:
Result:
You just got a nice looking "button". Also, this is the correct/traditional way to do it. An actual button would not let you open in a new tab, and it doesn't act as a link, and it breaks the back button.
@codingjlu Thank you so much for the help.(¬‿¬)
@Satkrithi np :)