Skip to main content
D
React
React JSX

React JSX

JSX allows developers to write HTML directly inside JavaScript.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

JSX stands for JavaScript XML. It looks exactly like HTML, but it lives completely inside a JavaScript file. React takes this JSX code and converts it into real HTML elements that the browser can understand.

Example

Example
1/* this creates JSX */
2const title = <h1>Hello React!</h1>;
3const page = (
4  <div>
5    {title}
6    <p>This is JSX.</p>
7  </div>
8);

Key Points

  • JSX blends HTML and JavaScript together.
  • It requires wrapping multiple elements in a single parent.
  • You can inject JavaScript variables using curly braces `{}`.
  • Browsers cannot read JSX without a compiler like Babel.

Up Next

Continue your journey with the next topic.

Go to React Components