W3C validator error: Attribute placeholder is only allowed if input type

Given an HTML document

<!DOCTYPE html> 
<html>
  <head>
    <title>Title</title>
  </head> 
  <body>
    <form> 
      <input type="email" placeholder="E-Mail"/>
    </form>  
  </body>
</html>

The W3C validator (v1.3) contains the following error message:

Row 8, Column 48: The attribute placeholderis only allowed if the input type is email, number, password, search, phone, text or URL.

Why?

+4
source share
1 answer

This seems to be a bug in the validator.

, http://validator.w3.org/ http://validator.w3.org/nu/, , placeholder " , e-mail [...]".
HTML5 email, e-mail ( , type="e-mail").

, , , placeholder, e-mail email. , , .

+2

All Articles