Check out example codes for "w3 schools". It will help you in understanding the concepts better.

Code Example 1

<button onclick="myFunction()">Click Me!</button>


<script>

function myFunction() {

  var x = document.getElementById("demo");

  x.style.fontSize = "25px"; 

  x.style.color = "red"; 
}

</script>

Code Example 2

MDN vs W3S: Civil War!

Code Example 3

Name: <input type="text" name="name">

 E-mail: <input type="text" name="gdgdfgfdgfdg">
Website: <input type="text" name="website">
Comment: <textarea name="comment" rows="5" cols="40">

Code Example 4

Name: <input type="text" name="name">

 E-mail: <input type="text" name="email">
Website: <input type="text" name="website">
Comment: <textarea name="comment" rows="5" cols="40">

Learn ReactJs, React Native from akashmittal.com