Check out example codes for "psd to html". It will help you in understanding the concepts better.
Code Example 1
<!-- Answer to: "psd to html" --> <!-- A link to a useful HTML to PDF converter (and looks nice): https://psd2html.com/ -->
Learn ReactJs, React Native from akashmittal.com