How can I limit an input tag to only have the first value? In this case it would be value1.
<input value="value1
value2
value3
value4">
Assuming you are using HTML 5, the best way to do this is to use the pattern attribute.
<input pattern="\S+">