Complete Fragment Syntax
Fill in the Blank Easy
Question
Fill in the blank to wrap elements in a Fragment using shorthand.
Code
return (
_____
<h1>Title</h1>
<p>Text</p>
</>
);
Hint
The shorthand Fragment syntax looks like an empty tag.
Explanation
The Fragment shorthand is <>...</>. It groups multiple elements without adding a DOM node. The full form is <React.Fragment>...</React.Fragment>.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.