const heading = <h1>Hello world</h1>;
JSX is popularly used in React and in this post, I will be highlighting the key differences between JSX and HTML syntax.
<div className = "container"></div>
<div class = "container"></div>
Self-closing tags in JSX must have the forward slash whereas the forward slash is optional in the HTML self-closing tags.
<img src="#" />
<img src="#" >
Event listeners in JSX are written in camelCase, for instance,
onClick whereas in HTML, they are written in lowercase for instance,
These are some of the key differences. You can have a look at the React documentation if you would like to learn more about JSX.