Is this good practice?

<a href="#"> <button>Read More</button> </a> If I have button and I want when user clicks on it, the user should be moved to other page, is it consider a best practice wrt accessibility? I was reading in HTML course of web.dev, screenshot attached. If this is wrong, what is the best practice for a button that move to other page by clicking, while keeping accessiblity in mind??
No description
4 Replies
snxxwyy
snxxwyy4mo ago
If it was me, I’d create a button class, then you can simply apply that to your anchor tag, making it look like a button
Jochem
Jochem4mo ago
Like the text you linked said, you can't put a button in a link. Snxxwyy has the right idea
Hamza Naeem
Hamza NaeemOP4mo ago
Thats helpful, thank you
snxxwyy
snxxwyy4mo ago
No problem
Want results from more Discord servers?
Add your server