HTML Compatibility Browser Compatibility

Which browsers support the html placeholder tag for text input? Does Internet Explorer support it? (I have a JavaScript shortcut that I can use for browsers that don't support it.)

<input type=TEXT placeholder="placeholder here" />

+41
html browser placeholder
Oct 23 '10 at 13:08
source share
10 answers

It is currently supported by all major browsers except IE 9 and earlier, and Opera mini.

Check out the w3schools-specs for updates. Or even better, check out the Overview .

+17
23 Oct 2018-10-23
source share
— -

For anyone that is interested, this is a jQuery error that I use. I use it with the jQuery validation mechanism.
Replace FORMCLASS with the class of your form.

 <!-- IF IE - use Placeholder Fallback --> <!--[if lt IE 10 ]> <script> $(".FORMCLASS").find('[placeholder]').each(function(){ $(this).val($(this).attr('placeholder')); $(this).focus(function() { if ($(this).attr('placeholder')==$(this).val()) { $(this).val(''); } }); }); </script> <![endif]--> 
+18
Jan 2 '13 at 6:53
source share

According to this , IE 10 supports it. (You can test it here )

I am fixing this problem - perhaps the easiest way:

 <!--[if lt IE 10]>email:<![endif]--> <input placeholder='email' type='text' name='email'> 
+17
Jun 28 2018-12-12T00:
source share

Firefox also supports it since version 4.0

+10
Jun 01 2018-11-11T00:
source share

IE does not support linkers

I feel this code better and it works in all major browsers

 <input id="example-email" type="text" value="Email Address" onfocus="if(this.value === 'Email Address') this.value = '';" onblur="if(this.value === '') this.value = 'Email Address';" name="example-email"> 
+7
Nov 27 '12 at 5:17
source share

The question may have been answered several years ago, but today I found it in a search.

Since a good link and photo have not been submitted before, I am updating this question with both.

The HTML5 splash screen attribute basically says:

The placeholder attribute is supported in all major browsers except Internet Explorer.

FYI: This includes IE9.

screenshot

+6
Sep 18
source share

In case someone is looking for an HTML5-placeholder solution for unsupported browsers, here is a good article:

http://www.viget.com/inspire/a-better-jquery-in-field-label-plugin/

+4
Oct 07 2018-11-11T00:
source share

Placeholders are fully supported:

  • FF 4+
  • Chrome 4+
  • Safari 5+
  • Opera 11.6 +
  • IE 10+

Source: Can I use an attribute of an input attribute?

+4
Jul 30 '13 at 7:02
source share

For those who want the simplest solution, use the built-in functions!

 <input type="text" name="email" value="Email Address" placeholder="Email Address" onfocus="if(this.value==this.placeholder) this.value=''" onblur="if(this.value=='') this.value=this.placeholder"> 

Tested in chrome and IE8 :)

Note. I use this with lots of javascript to validate input and provide feedback inside the field itself, changing the value and placeholder at runtime.

+3
May 2 '13 at 8:40
source share

I know this is an old question. My suggestion is to use Modernizr to detect placeholder support! https://modernizr.com/

0
Oct 13 '15 at 15:00
source share



All Articles