-1

I created an <a> tag with href to redirect to another page. On clicking nothing happens only on the a specific page I'm working on. seems like there is some CSS which bloc the redirect task.

I tried to use pointer-events to solve it but nothing happens to. Any idea about what could be the reason ?

<button class = "link external" style="pointer-events: auto;" href="chooseproducts.php">test</button>

j08691
  • 204,283
  • 31
  • 260
  • 272
Yas
  • 7
  • 3

1 Answers1

1

The element for creating a link is <a>.

There is no href attribute for a <button> element (which, depending on its type, is used to submit forms, reset forms, or attach JS to).

Using a validator would have highlighted this error.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • Hi , oh yes i provide a wrong tag for button . i just restart my editor and the a tag works fine. Thanks a lot for your help – Yas Jun 07 '21 at 15:52