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

Code Example 1

<p class="ClassExample">ClassExample!!</p>

Code Example 2

<h1 class="write a name">H1 content</h1>

Code Example 3

<!-- in the head element -->
<style> h1 { color:blue; } </style>

<!-- in the body element -->
<h1> text in blue because all "h1" element is in blue </h1>

Code Example 4

<p class="ThisIsAClassName">HI</p>

Learn ReactJs, React Native from akashmittal.com