<button class="button button-outline button-positive">
<a href="www.google.com">fes</a>
</button>
If I use ng-click
, it's works fine, but I need href
.
The only difference is that the <button> element allows children. You'd intuitively expect to be able to use <button href="https://google.com"> analogous with the <a> element, but unfortunately no, this attribute does not exist according to HTML specification.
It is illegal in HTML5 to embed a button element inside a link. To whom it may concern.
Inside a <button> element you can put text (and tags like <i> , <b> , <strong> , <br> , <img> , etc.). That is not possible with a button created with the <input> element! Tip: Always specify the type attribute for a <button> element, to tell browsers what type of button it is.
Drop the button and decorate the a
element with the class names.
<a href="www.google.com" class="button button-outline button-positive">fes</a>
hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With