0
Is there any difference between placeholder and value attribute?
For example; âplaceholder <input type="text" id="fname" name="fname"  placeholder="John"> âwill display John in the text area â value  <input type="text" id="fname" name="fname"  value="John"> âWill display John in the text area
3 Answers
+ 1
Hi Mau'Kauba Nibabe you could have tried it first by yourself before posting the question and then answering it.
This post will be reported under the offence "self-answer". It might as well be removed.
+ 1
âHi Avinesh, I tried it and didn't realize the difference so I post the question.
đThen I waited for people to answer but no one did.
âSo I went back and tried doing it again, and then I realized the difference.
0
âGot it:
âThe value attribute puts actual content inside of a form, so if you want to change it you have to delete it first.
âWhile the placeholder attribute puts an image of content inside of a form, so when you click on the box and start typing it disapears.
â Placeholder is used more so to specify what the input box is for, were as the value will give a default value.