Check out example codes for "how to write css in html". It will help you in understanding the concepts better.

Code Example 1

<link rel="stylesheet" href="styles.css">

Code Example 2

<style>
#panel{
      height: 60%;
      margin-top: 7%;
      margin-left: 10%;
      margin-right: 10%;
      font-family: myriad-pro, sans-serif;
      font-style: normal;
      font-weight: 300;
    }
</style>

Code Example 3

<head>
	<link rel='stylesheet' href='style.css'>
</head>

Code Example 4

<!-- External CSS -->
<!-- External styles are defined within the <link> element, inside the <head> section of an HTML page: -->
<!--  
body {
  background-color: lightblue;
}

h1 {
  margin-left: 20px;
}
-->
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
  <h1>Heading Text</h1>
</body>

<!-- Internal CSS -->
<!-- Internal styles are defined within the <style> element, inside the <head> section of an HTML page: -->
<head>
<style>
body {
  background-color: linen;
}

h1 {
  color: maroon;
  margin-left: 40px;
}
</style>
</head>
<body>
  <h1>Heading text</h1>
</body>

<!-- Inline CSS -->
<!-- Inline styles are defined within the "style" attribute of the relevant element: -->
<body>
  <h1 style="color:blue;text-align:center;">Heading Text</h1>
  <p style="color:red;">Paragraph Text.</p>
</body>

Code Example 5

<!DOCTYPE html>
<html>
<body>

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


  </body>
</html>

Code Example 6

<p style="color: blue; font-size: 46px;">

Learn ReactJs, React Native from akashmittal.com