Skip to main content

How about this

<input type="text" value="placeholder text" onfocus="this.style.color='#000'; 
this.value='';" style="color: #f00;"/>

<input type="text" value="placeholder text" onfocus="this.style.color='#000'; 
    this.value='';" style="color: #f00;" />

No CSS or placeholder, but you get the same functionality.

How about this

<input type="text" value="placeholder text" onfocus="this.style.color='#000'; 
this.value='';" style="color: #f00;"/>

No CSS or placeholder, but you get the same functionality.

How about this

<input type="text" value="placeholder text" onfocus="this.style.color='#000'; 
    this.value='';" style="color: #f00;" />

No CSS or placeholder, but you get the same functionality.

changed onclick to onfocus per Muhd's suggestion
Source Link

How about this

<input type="text" value="placeholder text" onclick="thisonfocus="this.style.color='#000'; 
this.value='';" style="color: #f00;"/>

No CSS or placeholder, but you get the same functionality.

How about this

<input type="text" value="placeholder text" onclick="this.style.color='#000'; 
this.value='';" style="color: #f00;"/>

No CSS or placeholder, but you get the same functionality.

How about this

<input type="text" value="placeholder text" onfocus="this.style.color='#000'; 
this.value='';" style="color: #f00;"/>

No CSS or placeholder, but you get the same functionality.

Source Link

How about this

<input type="text" value="placeholder text" onclick="this.style.color='#000'; 
this.value='';" style="color: #f00;"/>

No CSS or placeholder, but you get the same functionality.