I have a question about frameborder

How come YouTube, facebook, and all the others of embedable videos don’t use
style=“border:0;” instead of frameborder=“0”?

If frameborder is obsolete wouldn’t all major companies follow that rule?

<iframe width="560" height="315" src="https://www.youtube.com/embed/bU8fLRxB4nI" style="border:0;" allowfullscreen>

I directed my question to YouTube, let’s see if I get a reply back.

Google is not the best at having valid HTML - they don’t need to be.

https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.google.com%2F

https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.youtube.com%2F

How come frameborder is obsolete anyway if millions upon millions of people are using it? Anyone who embeds a video uses it.

“border” (shorthand) is a unit of length (thickness)

Is either a non-negative explicit value or a keyword denoting the thickness of the border area of a box.

“frameborder” is/was a boolean - true or false

https://www.w3.org/TR/1999/REC-html401-19991224/present/frames.html#adef-frameborder

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe

frameborder HTML 4 only
The value 1 (the default) tells the browser to draw a border between this frame and every other frame. The value 0 tells the browser not to draw a border between this frame and other frames.

Because they don’t know any better and it doesn’t cause any obvious problem?

1 Like

Not everyone, when I get embed code from Youtube or the likes, I remove all that obsolete, invalid stuff.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.