Ask coding questions

← Back to all posts
Code not working. Please help
DreamyStars

In the file contact.html i put a button link called go back to main page and gave the link as index.html:

This is the code but it is not working.
Please help

Answered by codingjlu [earned 5 cycles]
View Answer
Voters
DreamyStars
Comments
hotnewtop
codingjlu

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.

DreamyStars

@codingjlu Thank you so much for the help.(¬‿¬)

codingjlu
FishballNooodle

Sure about this
But you can create an <a> 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.