randomQuoteMachine twitter post button problem

how to add a button in my page, which on clicking post the given text in a

on twitter.

What have you tried so far? If you post a link to the code you have tried, we can give you some advice.

https://vishal-1999.github.io/randomQuoteMachine/

post on twitter

I figured it out. I was trying to put the link inside a button tag. That was the problem.