Unable to validate HTML5 when using placeholder in div
NickName:pallasmedia Ask DateTime:2015-06-11T07:21:00

Unable to validate HTML5 when using placeholder in div

I've been contributing to a WYSIWYG text editor that was made using HTML5 and jQuery. While doing some of my research I've been seeing a lot of people use the placeholder attribute in a div. However, this does not follow the specification and I end up with the following error when I try to validate my HTML.

Attribute “placeholder” not allowed on element “div” at this point.

Is there a better way to do this so that my HTML will validate and I still end up with a placeholder?

Copyright Notice:Content Author:「pallasmedia」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30768977/unable-to-validate-html5-when-using-placeholder-in-div

More about “Unable to validate HTML5 when using placeholder in div” related questions

Unable to validate HTML5 when using placeholder in div

I've been contributing to a WYSIWYG text editor that was made using HTML5 and jQuery. While doing some of my research I've been seeing a lot of people use the placeholder attribute in a div. However,

Show Detail

jQuery Validate plugin and HTML5 Placeholder plugin issues with IE

I am having an issue with the Jquery validate and html5 placeholder. It works great in chrome and FF but IE 9 and below I have an issue. I only see the issue when I hit submit first. Every field ...

Show Detail

placeholder issue with jQuery Validate

I noticed today that we have an issue with jquery Validate when used in conjunction with placeholder text. Example: <div class="sort left"> <label for="username" class="inlineelement"

Show Detail

jquery.validate + html5 placeholder | help binding

If anyone has tried to use the jQuery.Validate plugin in conjunction with the HTML5 placeholder you probabbly know that the placeholder text allows for a submission of the input, when it shouldn't....

Show Detail

Html5 validate input value not eqaul to by default value

I want to validate input value not equal to by default value through html5 validation,is it possible? <input type="text" name="First Name" value="First Name" id="FirstName" required=""

Show Detail

jQuery Validation and Placeholder conflict

I'm using the jQuery Validation plugin to validate a form on my site. http://docs.jquery.com/Plugins/Validation I'm also using the following code to provide Placeholder support for browsers that ...

Show Detail

HTML5 Placeholder is not working in windows phones?

HTML5 Placeholder is not working in windows phones? Using HTML5 and Javascript a created a web appliacation which is working on all the devices, now getting problem that PlaceHolder is not working in

Show Detail

Logic behind HTML5 Placeholder

I am working with a form. Each input field name is identified by its Placeholder. My form working fine in Chrome and Mozilla but fail in IE7 and IE8 because these browser does not support Placeholder

Show Detail

Html5 placeholder Issue on all IE

I seem to have a strange problem with HTML5 placeholder. Im using a drop down menu to show/hide divs and within a div i have few text fields when i choose one of the options from the drop down to ...

Show Detail

Unable to validate registration form using jQuery

I am unable to validate my registration form using jQuery. When I click on submit button it directly takes me to the action file i.e. registeraction.php without validating the form fields. Here i...

Show Detail