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

Code Example 1

<style>
.rectangle{
padding-top: 40px;
  width:100px;
  height:100px;
  border:1px solid #000; 
  position: relative;
  text-align: center;
}
</style>

<div class="rectangle">Hello world!</div>

Learn ReactJs, React Native from akashmittal.com