Code Editor
Intro to JSX

The Mystery, Revealed


Take another look at the line of code that you wrote.

Does this code belong in a JavaScript file, an HTML file, or somewhere else?

The answer is...a JavaScript file! Despite what it looks like, your code doesn't actually contain any HTML at all.

The part that looks like HTML, <h1>Hello world</h1>, is something called JSX.

Click Next to learn about JSX.

Report a Bug
If you see a bug or any other issue with this page, please report it here.