views:

38

answers:

2

Is there a way ( with languages like css, html or javascript ) to custom the text prompt in input tags ?

For text prompt I mean that vertical flashing line in the input tags.

+2  A: 

I assume by prompt you mean something like 'Enter your Full Name'

HTML5 Forms support this default message as an attribute.

If you want to use CSS, check out the overlabel approach found in this article.

If neither of those meet your fancy, user some good old fashion Javascript focus and blur events. All you need is some logic to ensure that the user has not entered any text and clear our the value (on focus) or put the default text back (on blur). I am sure you can find some code via a Google Search.

Jason McCreary
The OP seems to be referring to the insertion caret ("vertical flashing line").
casablanca
What does OP mean? :/ I know it refers to the one who asked the question, but what does it mean?
Francisc
@Francisc - I think Original Poster, or at least close enough.
Jason McCreary
Aha! Thank you.
Francisc
+1  A: 

You cannot customize the text cursor for a Webpage.

Francisc