How to make an HTML element non-focusable?

Spread the love

To make an HTML element non-focusable, we set the tabindex attribute to -1.

For instance, we write

<a href="" tabindex="-1">unfocusable</a>

to set the link’s tabindex attribute to -1 to make the link non-focusable.

Leave a Reply

Your email address will not be published. Required fields are marked *