<html>
<head>
<title>Abakada CSS Demo: focus Pseudo-Class</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<style>
form { width: 50%; background: beige; margin: 20; padding: 10;
border: 2px solid silver; border-radius: 30px }
input:focus { background: wheat }
select:focus { background: palegoldenrod }
a:focus { background: maroon; color: gold;
padding: 5; font-weight: bold; text-transform: uppercase }
</style>
</head>
<body>
<div class="header"><h2>Abakada CSS Demo: <b>focus</b> Pseudo-Class</h2></div>
<hr size=1 width=92%>
<div align="center">
<h4>This example demonstrates using the <b>:focus</b> pseudo class to set styles for elements that are currently in focus.</h4>
<p>To access each form field, the user can either click on the text field, click on the label, use the TAB key, or press ALT + the underlined key. </p>
<form>
<table cellpadding=10>
<tr>
<th>Label</th>
<th>Control</th></tr>
<tr>
<td><label for=firstname tabindex=-1>First <u>N</u>ame</label></td>
<td><input accessKey=n id=firstname name=firstname tabindex=1></td></tr>
<tr>
<td><label for=lastname tabindex=-1><u>L</u>ast Name</label></td>
<td><input accessKey=l id=lastname name=lastname tabindex=2></td></tr>
<tr>
<td><label for=fav tabindex=-1>Favorite <u>P</u>astime</label></td>
<td><select accessKey=p id=fav name=fav tabindex=3>
<option selected>Web
<option>Movies
<option>Concerts
<option>Pubs
<option>Books</option></select></td></tr>
</table>
</form>
<p>By clicking on a control label, the specified control is given focus. <br>
In addition to using <b>label</b>, the <b>accesskey</b> attribute specifies an acceleration key to give the form focus. <br>
Each acceleration key is underlined in the label for easy identification. </p>
</div>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>