Check out example codes for "html button tag". It will help you in understanding the concepts better.
Code Example 1
<html>
<head>
<title>Buttons</title>
</head>
<body>
<button onclick = "myfunction()">button</button>
<script>
function myfunction() {
console.log("This is a working button");
}
</script>
</body>
</html>
Code Example 2
<button>button!!!!!<button>
Code Example 3
<button type="button">Click Me!</button>
Code Example 4
<button type="button"> This is a button</button>
<button type="submit"> This is a submit button (used in forms)</button>
<button type="reset"> This is a reset button (used in forms)</button>
Code Example 5
<html>
<head>
<title>Submit Button</title>
</head>
<body>
<form> <!-- Create a form -->
<div> <!-- Add Label if want -->
<label for="firstName">First Name:</label>
<input type="text" name="firstName" id="firstName">
</div> <!-- You can just add a button but this is convenient -->
<div>
<label for="lastName">Last Name:</label>
<input type="text" name="lastName" id="lastName">
</div>
<!-- This button will submit the form fields to a server -->
<button type="submit">Submit Full Name</button>
<!-- Or you could reset all fields in form -->
<button type="reset">Reset Full Name</button>
<!-- Or create a button for specific purposes -->
<button type="button">Do Nothing</button>
<!-- Can add "onclick" from Talented Tarantula or some code -->
</form>
</body>
</html>
Code Example 6
<button type="button" onclick="alert('You pressed the button!')">Click me!</button>
Learn ReactJs, React Native from akashmittal.com