0

I have a page called index.html and I have another page called Contact Us. Now I placed a button called 'login' in the index page if click that link I need to navigate to contact us page. I tried but i am not getting. Here is my code.

<ul class="nav navbar-nav navbar-right">
<li><a href="http://login.html"><span class="glyphicon glyphicon-log-in">`</span> Login</a></li></ul`>`

if i click this it should navigate to next page called "Contact Us"

Jose Rodriguez
  • 9,753
  • 13
  • 36
  • 52
vijay
  • 53
  • 2
  • 12
  • Check [this question](http://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link) – Dominique Lorre Sep 12 '16 at 14:56
  • where is the domain? href="http://DOMAIN/login.html" – Joao Polo Sep 12 '16 at 15:35
  • @Joaozito Polo please update new answer for this updated question – vijay Dec 02 '16 at 05:10
  • @VjRagavan You should ask a new question, rather than editing a question that you have accepted an answer for. If you give me the link to your new question, I might be able to answer it again for you. – dading84 Dec 02 '16 at 23:52
  • @dading84 yes but for that i have to wait for 7 more days to post a new question...what i do? – vijay Dec 03 '16 at 05:22
  • http://stackoverflow.com/help/asking-rate-limited This article explains why you have temporary restriction on asking questions. In regard to new questions, you can almost always find the answer already on here, if you take the time to search. – dading84 Dec 03 '16 at 12:49

3 Answers3

0

Remove the 'http://' so it's just 'login.html'

<a href="login.html">link text</a>

Best to learn HTML here: http://www.w3schools.com/html/html_links.asp

Thomas James
  • 687
  • 2
  • 6
  • 21
0

I would recommend reading this page from the w3 schools site.

http://www.w3schools.com/html/html_links.asp

It explains how to use html links.

a html link is written like this:

<a href="http://www.google.co.uk">Google</a>

In your case if your files are in the same folder you could use a local link address. (if contact_us.html is the name of the contact page file) You could write your link as:

<a href="contact_us.html">Contact Us</a>
dading84
  • 1,210
  • 12
  • 18
0

The correct format to link a page is:

<a href="login.html">Login</a>

The long version would be:

<a href="http://www.myname.example/login.html">Login</a>

If you have your site in folders, you have to specifiy the folder in the link, as in the first one it would be:

<a href="foldername/login.html">Login</a>

or:

<a href="http://www.myname.example/foldername/login.html">Login</a>
Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
Wicked
  • 31
  • 8