Search code examples
htmlauthenticationhyperlinkhref

Setting a button in html


How do I set up a link button in html?

I want to set a button from the homepage so that user may be viewed by a log in screen. I have two index.html files, one for the homepage, and one for the login screen. How do I set it so when users click on log in they will be presented with the login screen.

I tried <li><a href="login/index" class="button big special">Sign Up/lOG IN</a></li>.

My goal was to use href= location of index.html.

When I click the link it takes me to an error page. The top link would be the address to the index file that has the login html.


Solution

  • You don't have .html on your url. Try:

    <li><a href="login/index.html" class="button big special">Sign Up/lOG IN</a></li>
    

    Also, you are using a relative link, so the position of the file where you have this link is important. Right now it will look one directory up for a file named index.html. If the file with the link is foo.html make sure in the same folder you have a folder named login that has a file named index.html.