HTML CSS examples for HTML Tag:button
The autofocus attribute is a boolean attribute to set if a button should automatically get focus when the page loads.
A button with autofocus:
<!DOCTYPE html> <html> <body> <button type="button" autofocus onclick="console.log('Hello world!')">Click Me!</button> </body><!-- w w w. java 2s .co m--> </html>