Check out example codes for "CSS Class Name Generator". It will help you in understanding the concepts better.

Code Example 1

<main class='mainly'>
  <p>Lorem ipsum</p> <!-- I'd like to style this paragraph-->
</main>

Code Example 2

<div class='submit'/> <!-- Wooot ? -->

Code Example 3

main.mainly p { /* DON'T DO THIS */
}

/* Instead, assign a class name to p : <p class='paragraphly' /> */
.paragraphly {
}

Learn ReactJs, React Native from akashmittal.com