HTML Buttons

HTML Buttons

HTML buttons allow users to interact with a webpage, such as submitting forms, triggering scripts, or performing actions. The <button> tag is commonly used, and it can contain text or HTML content like images.


Basic Button Example


 

Output:
A simple clickable button that says Click Me.


Button Types

  1. Submit Button – Submits a form.


 

  1. Reset Button – Resets form fields.


 

  1. Regular Button – Can be used with JavaScript.


 


Styled Button Example


 

Output:
A blue button with white text, padding, and rounded corners.


Key Points

  • <button> can contain text, images, or HTML elements.

  • Use type=”submit”, type=”reset”, or type=”button” depending on functionality.

  • Buttons can be styled using CSS for better appearance.

CodeCapsule

Sanjit Sinha — Web Developer | PHP • Laravel • CodeIgniter • MySQL • Bootstrap Founder, CodeCapsule — Student projects & practical coding guides. Email: info@codecapsule.in • Website: CodeCapsule.in

You may also like...

Leave a Reply

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