JSX for vs htmlFor in Full-Stack Course React Part

Hello everyone.
In the React forms section of the Full-Stack career path, within JSX:

  <label htmlFor="firstName">First Name: </label>
  <input value={userName} onChange={handleFirstNameChange} style={marginTop} id="firstName" type="text" />

In this part inside the <form> element (<label htmlFor="firstName">First Name: </label> ), we used the for attribute, but in the next project (Saucy Tango Food Order Form), we were asked to use htmlFor within JSX. Normally, I know that for is a reserved word for JavaScript, but the code still worked in that section of the course. Is using for in that context a mistake? Or is there no problem with it?