How to create a label inside an <input> element?

后端 未结 13 581
悲哀的现实
悲哀的现实 2021-01-29 22:54

I would like to insert a descriptive text inside an input element that disappers when the user click on it.

I know it is a very common trick, but I do not know how to do

13条回答
  •  别那么骄傲
    2021-01-29 23:27

    One hint about HTML property placeholder and the tag textarea, please make sure there is no any space between , otherwise the placeholder doesn't work, for example:

    
    

    This won't work, because there is a space between...

提交回复
热议问题