I have read on w3schools.com that there is this default value in every browser:
iframe:focus { outline: none; }
So I tried to change it to
iframe:focus { outline: 10px solid red; }
Here is the example (You have to click the first button and then use tab to navigate to the iframe.):
iframe:focus
{
outline:10px solid red;
}
input:focus
{
background:blue;
}
<input type="button" value="button1" />
<input type="button" value="button2" />
<iframe src="about:blank"></iframe>
It seems that an iframe can't get the focus. The same is said in 34157775.
So my question is: Why is there a default value for iframe:focus on w3schools.com if an iframe can't even get the focus? Is this a bug on w3schools.com?