Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
const JSX = (
<div>
<h2>Welcome to React!</h2> <br >
<p>Be sure to close all tags!</p>
<hr >
</div>
);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36
Challenge: React - Learn About Self-Closing JSX Tags
Link to the challenge:
Hey! Its better to always add a description of the issue you’re facing so its easier for others to help you!
As for this particular issue, in HTML the browser does not complain even if you don’t add a / to the closing tag. In React however, its mandatory for you to add a / so
hardiktheprogrammer:
<br >
needs to be
<br />
Hope this helps!
system
Closed
January 27, 2023, 11:42pm
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.