Check out example codes for "w3". 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

<!DOCTYPE html>
<html>
  <title>HTML Tutorial</title>
  <body>
    <h1>This is a heading</h1>
    <p>This is a paragraph.</p>
  </body>
</html>

Learn ReactJs, React Native from akashmittal.com