Ezekiel Rivera Ezekiel Rivera - 1 year ago 51
HTML Question

I need help setting a button on html

So I'm very new to html I just finished some courses yesterday and decided to explore it a little. I know this will sound very simple but I am having issues setting up a link button in html. So the button I want to set is 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. I am not shure how to set it so when users click on log in they will be presented with the login screen.

<li><a href="login/index" class="button big special">Sign Up/lOG IN</a></li>
This is what I tried. My goal there was to use href= location of index.html I am not shure what I am doing wrong please help. When I click the link to test it, it would take me to an error page. The top link would be the address to the index file that has the login html.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download