w3c HTML validation error
-
Hello, when running my website through [w3c validator](https://validator.w3.org/) I see the following error generated from the button on the cookie banner. It seems that the “href” attribute is not allowed. Please fix this. Thanks!!
HTML from my webpage:
<!-- Eu Cookie Law 3.1.4 --><div class="pea_cook_wrapper pea_cook_bottomright" style="color:#FFFFFF;background:rgb(0,0,0);background: rgba(0,0,0,0.85);"><p>By continuing to use the site, you agree to the use of cookies. <a style="color:#FFFFFF;" href="#" id="fom">more information</a> <button id="pea_cook_btn" class="pea_cook_btn" href="#">Accept</button></p></div><div class="pea_cook_more_info_popover"><div class="pea_cook_more_info_popover_inner" style="color:#FFFFFF;background-color: rgba(0,0,0,0.9);"><p>The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.</p><p><a style="color:#FFFFFF;" href="#" id="pea_close">Close</a></p>
Errors from the w3c validator:
Error: Attribute href not allowed on element button at this point. From line 552, column 16724; to line 552, column 16779 ation</a> <button id="pea_cook_btn" class="pea_cook_btn" href="#">Accept Attributes for element button: Global attributes disabled — Whether the form control is disabled form — Associates the element with a form element formaction — URL to use for form submission formenctype — Entry list encoding type to use for form submission formmethod — Variant to use for form submission formnovalidate — Bypass form control validation for form submission formtarget — Browsing context for form submission name — Name of the element to use for form submission and in the form.elements API type — Type of button value — Value to be used for form submission
- The topic ‘w3c HTML validation error’ is closed to new replies.