Check out example codes for "html style tag". It will help you in understanding the concepts better.

Code Example 1

<html>
<head>
<style>
  h1 {color:red;}
  p {color:blue;}
</style>
</head>
<body>

<h1>A heading</h1>
<p>A paragraph.</p>

</body>

Code Example 2

<style>
  /* Put in CSS */
</style>

Code Example 3

<h1 style="color:blue;">This is a Blue Heading</h1>
<!DOCTYPE html>
<html>
<head>
<style>

 body {background-color: powderblue;}
h1   {color: blue;}
p    {color: red;}

</style>
</head>
<body>

<h1>This is a 
 heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Code Example 4

<html>
  <body>
    <!-- BODY HTML -->
  </body>
  <head>
    <!-- HEAD HTML -->
  </head>
  <style>
    /* CSS */
  </style>

Code Example 5

<h1 style="color:blue;text-align:center">This is a header</h1>
<p style="color:green">This is a paragraph.</p>

Code Example 6

<html>
  <body>
    <!--Some HTML-->
    
    <style>
      /*Some CSS*/
    </style>
  </body>
</html>

Learn ReactJs, React Native from akashmittal.com