Check out example codes for "details summary html5". It will help you in understanding the concepts better.

Code Example 1

<details>
  <summary>Some details</summary>
  <p>More info about the details.</p>
</details>

Learn ReactJs, React Native from akashmittal.com