Check out example codes for "what is xhtml". It will help you in understanding the concepts better.

Code Example 1

XHTML was developed to make HTML more extensible and flexible to work with other data formats (such as XML). 
In addition, browsers ignore errors in HTML pages,
and try to display the website even if it has some errors in the markup. 
So XHTML comes with a much stricter error handling

Learn ReactJs, React Native from akashmittal.com