How to get focused a button automatically when the page load using HTML ?
The <button> tag in HTML is used to define the clickable button. The <button> tag is used to submit the content. The images and text content can use inside <button> tag.
The <button> autofocus attribute is used to get focused button automatically after loading the web pages.
<button type="" autofocus> Submit <button>
On click of the submit button, the following alert message box is shown to the user.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.