views:

130

answers:

2
A: 

If you know css, you can use the :focus pseudo-class to highlight an element when it has keyboard focus.

The following style will make all inputs' background color change to grey when they receive keyboard focus:
input:focus { background: #ccc; }

Rowno
A: 

You can select all elements with a tabindex attribute:

<style>
*[tabindex] {
 border: solid red 1px;
}
</style>

<p><input type="text" tabindex="1" /></p>

<p tabindex="2">Hello</p>

The question is a little ambiguous - did you want to highlight an element when it has focus or highlight an element that can have focus?

pygorex1