A button with autofocus.
The autofocus
attribute is a boolean attribute.
When present, it specifies that a button should automatically get focus when the page loads.
The numbers in the table specify the first browser version that fully supports the attribute.
<button type="button" autofocus>
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The button autofocus attribute</h1>
<button type="button" autofocus onclick="alert('Hello world!')">Click Me!</button>
</body>
</html>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |