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

Code Example 1

/*put a # infront of the id*/
/*<section id="example"></section>*/
#example{
	margin: auto;
}

Code Example 2

<style>
  #selector {
  color: red;
}
/* # is id selector */
</style>


<div id="selector">
<p>This is an id</p>
</div>

Code Example 3

#id{
    color:red;
}

Code Example 4

<style>
  #test {
  /*Styleing here*/
  }
</style>
<h1 id="test"></h1>

Code Example 5

In the CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded by a hash character (“#”). The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one

Learn ReactJs, React Native from akashmittal.com