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:
This is the code but it is not working.
Don't do a button; use a link - you can style one to look like a button, something like this CSS:
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.
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"