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

Code Example 1

<!-- Tab links -->
<div class="tab">
  <button class="tablinks" onclick="openCity(event, 
  <button class="tablinks" onclick="openCity(event, 
  <button class="tablinks" onclick="openCity(event, 


<!-- Tab content -->
<div id="London" class="tabcontent">
<p>London is the capital city of England.</p>

id="Paris" class="tabcontent">
is the capital of France.</p> 

<div id="Tokyo" class="tabcontent">
  <p>Tokyo is the capital of Japan.</p>

Code Example 2

/* Style the tab */
.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;

/* Style the buttons that are used to open the tab content */
.tab button {

  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;

/* Change background color of buttons on hover 
.tab button:hover {
  background-color: #ddd;


/* Create an active/current tablink class */
  background-color: #ccc;

/* Style the tab content */
.tabcontent {

  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;

Learn ReactJs, React Native from