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

Code Example 1

.borderLabel{
                padding:10px;
                border:2px solid;
                margin:10px;
            }
            .borderLabel>label{
                padding-left: 5px;
                padding-right: 5px;
                position:relative;
                top:-20px;
                left:20px;
                background-color:white;
            }

<div class="handtekening borderLabel">
<label>ON: Dhr. R. van Noort name</label>
<img src="rene_diamant_handtekening.jpg" width="200" >
</div>

Learn ReactJs, React Native from akashmittal.com