Place link within the button [closed]

1

I'm sorry for the question, it's a very simple question, but I do not know how to solve it.

The tag creates the button but when I click the button it simply does nothing. It does not lead me to the link, it continues on the same page.

<a href="home.html"><button>Home</button></a>

    
asked by anonymous 13.12.2018 / 12:51

1 answer

2

Example of a button created with the A element using a Bootstrap CSS adaptation.

Customize as you like by changing CSS declarations:

.btn {
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  background-color: #000;
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 3px solid #999;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: .25rem;
  transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.btn:hover {    
  background-color: #999;
  border-color: #000; 
}
<a href="#" class="btn">BOTAO</a>
    
13.12.2018 / 14:01