<p>How do you automatically set the focus to a textbox when a web page loads?</p>

<p>Is there an HTML tag to do it or does it have to be done via Javascript?</p>

You need to use javascript:
```
```
<BODY onLoad="document.getElementById('myButton').focus();">
```
```
@Ben notes that you should not add event handlers like this. While that is another question, he recommends that you use this function:
```
```
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
```
```
And then put a call to addLoadEvent on your page and reference a function the sets the focus to you desired textbox.