- How do you make text inside an input field read-only?
You add the attribute readonly on your input.
Here’s more info:
The readonly attribute is a boolean attribute.
When present, it specifies that an input field is read-only.
A read-only input field cannot be modified (however, a user can tab to it, highlight it, and copy the text from it).
Here’s that example!
<input type="text" name="country" value="Norway" readonly>