Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iframe showing error on validation?

In my website(HTML5), i have facebook like option.

But validating through w3c validation, its showing error like this:

The frameborder attribute on the <iframe> element is obsolete. Use CSS instead.

If i am using css for style='border:none; overflow:hidden; width:75px; height:27px; Then it showing

"The scrolling attribute on the <iframe> element is obsolete. Use CSS instead."

<div style='float:left; padding:6px 0 0 0px'>
<iframe allowTransparency='true' frameborder='0' scrolling='no' src='http://www.facebook.com/plugins/like.php?href=' style='border:none; overflow:hidden; width:75px; height:27px;'></iframe></div>
</div>

If i am removing every inline style and giving in css,then its not showing any error except allowTransparency.

Why ?

like image 276
Prashobh Avatar asked Oct 08 '22 00:10

Prashobh


2 Answers

These attributes should be removed, not the inline style.

  1. allowtransparency attribute
  2. frameborder attribute
  3. Scrolling attribute
like image 63
Ahmad Alfy Avatar answered Oct 13 '22 11:10

Ahmad Alfy


According to the W3 HTML5 specification there is no allowTransparency, frameborder or scrolling attribute for the iframe element. So your page will never validate while you try to include any such attributes.

like image 24
Bobulous Avatar answered Oct 13 '22 12:10

Bobulous