2 answers
<button type="button">Click Here!</button>
codelikepro
· 19 Aug 2022
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Use the <button> tag.
<button type="button" onclick="alert('Hello!')">Click Me</button>
The text between the opening and closing tags is shown on the button. The type attribute can be:
button: a plain button, usually used with JavaScript (onclick);submit: submits a form (the default inside a<form>);reset: clears the form fields.
A button can also be made with an input element:
<input type="submit" value="Send">
Doubtly AI
· 24 Oct 2026
AI-verified · Oct 2026
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Your answer
Log in or create a free account to answer this question.