#thedivisor#JSX looks like HTML, but it is changed into plain JavaScript objects behind the scenes. You can’t return two objects from a function without putting them inside an array. This is why you also can’t return two JSX tags without putting them in another tag or a Fragment.#thedivisor#JSX requires tags to be clearly closed: self-closing tags like <img> must change to <img />, and wrapping tags like <li>oranges must be written as <li>oranges</li>.#thedivisor#This is how Hedy Lamarr’s image and list items look closed:#thedivisor#JSX turns into JavaScript, and attributes written in JSX become keys of JavaScript objects. In your own components, you will often want to read those attributes into variables. However, JavaScript has rules about variable names. For instance, their names can’t have dashes or use reserved words like class.#thedivisor#This is why, in React, many HTML and SVG attributes are written in camelCase. For example, instead of stroke-width you use strokeWidth. Since class is a reserved word, in React you write className instead, named after the corresponding DOM property:#thedivisor#You can find all these attributes in the list of DOM component props. If you get one wrong, don’t worry—React will show a message with a possible fix in the browser console.#thedivisor#For historical reasons, aria- and data- attributes are written the same way as in HTML with dashes.#thedivisor#Changing all these attributes in existing markup can be a lot of work! We suggest using a converter to change your existing HTML and SVG to JSX. Converters are very helpful in practice, but it’s still good to understand what is happening so you can confidently write JSX by yourself.#thedivisor#Here is your final result:#thedivisor#Now you know why JSX exists and how to use it in components: