` to your markup, you can write `<>` and `>` instead:
```js {1,11}
<>
Hedy Lamarr's Todos
>
```
This empty tag is called a *[React fragment](TODO)*. React fragments let you group things without leaving any trace in the browser HTML tree.
JSX looks like HTML, but under the hood it is transformed into plain JavaScript objects. You can't return two objects from a function without wrapping them into an array. This explains why you also can't return two JSX tags without wrapping them into another tag or a fragment.
### 2. Close all the tags {/*2-close-all-the-tags*/}
JSX requires tags to be explicitly closed: self-closing tags like `
![]()
` must become `
![]()
`, and wrapping tags like `
oranges` must be written as `oranges`.
This is how Hedy Lamarr's image and list items look closed:
```js {2-6,8-10}
<>
- Invent new traffic lights
- Rehearse a movie scene
- Improve the spectrum technology
>
```
### 3. camelCase
all most of the things! {/*3-camelcase-salls-most-of-the-things*/}
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. But JavaScript has limitations on variable names. For example, their names can't contain dashes or be reserved words like `class`.
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](https://developer.mozilla.org/en-US/docs/Web/API/Element/className):
```js {4}

```
You can [find all these attributes in the React DOM Elements](TODO). If you get one wrong, don't worry—React will print a message with a possible correction to the [browser console](https://developer.mozilla.org/docs/Tools/Browser_Console).
For historical reasons, [`aria-*`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA) and [`data-*`](https://developer.mozilla.org/docs/Learn/HTML/Howto/Use_data_attributes) attributes are written as in HTML with dashes.
### Pro-tip: Use a JSX Converter {/*pro-tip-use-a-jsx-converter*/}
Converting all these attributes in existing markup can be tedious! We recommend using a [converter](https://transform.tools/html-to-jsx) to translate your existing HTML and SVG to JSX. Converters are very useful in practice, but it's still worth understanding what is going on so that you can comfortably write JSX on your own.
Here is your final result:
```js
export default function TodoList() {
return (
<>
Hedy Lamarr's Todos
- Invent new traffic lights
- Rehearse a movie scene
- Improve the spectrum technology
>
);
}
```
```css
img { height: 90px }
```
Now you know why JSX exists and how to use it in components:
* React components group rendering logic together with markup because they are related.
* JSX is similar to HTML, with a few differences. You can use a [converter](https://transform.tools/html-to-jsx) if you need to.
* Error messages will often point you in the right direction to fixing your markup.
### Convert some HTML to JSX {/*convert-some-html-to-jsx*/}
This HTML was pasted into a component, but it's not valid JSX. Fix it:
```js
export default function Bio() {
return (
Welcome to my website!
You can find my thoughts here.
And pictures of scientists!
);
}
```
```css
.intro {
background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.summary {
padding: 20px;
border: 10px solid gold;
}
```
Whether to do it by hand or using the converter is up to you!
```js
export default function Bio() {
return (
Welcome to my website!
You can find my thoughts here.
And pictures of scientists!
);
}
```
```css
.intro {
background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red);
background-clip: text;
color: transparent;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.summary {
padding: 20px;
border: 10px solid gold;
}
```