You can see that <a>
is clickable, ie I click on it and it redirects me to another location for example, but I would like to know how I can click everywhere from <li>
to occur redirection and not only in <a>
ul {
list-style-type: none;
text-align:center;
}
ul li {
width: 200px;
height: 50px;
border: 1px solid black;
}
ul li:hover {
background: gray;
}
<ul>
<li> <a href="#"> Um </a> </li>
<li> <a href="#"> Dois </a> </li>
<li> <a href="#"> Tres </a> </li>
</ul>
It does not matter what location I click within <li>
it would execute href
within <a>