
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
Place autofocus in the text box when a page gets loaded without JavaScript support in HTML?
The autofocus attribute is a boolean attribute. When present, it specifies that an <input> element should automatically get focus when the page loads. An example is given below
<!DOCTYPE html> <html> <body> <form action = "/new.php"> First Name: <input type = "text" name = "fname" autofocus><br> Last Name: <input type = "text" name = "lname"><br> <input type="submit"> </form> </body> </html>
- Related Articles
- How to place the cursor (auto focus) in the text box when a page gets loaded with HTML?
- HTML DOM Input Text autofocus Property
- How to display JavaScript variables in an HTML page without document.write?
- Execute a script when media data is loaded in HTML?
- Adding default search text to search box in HTML with JavaScript?
- How to specify if and how the author thinks the audio/video should be loaded when the page loads in HTML?
- Execute a script when the element gets focus in HTML?
- JavaScript code to de-select text on HTML page.
- How to input text in the text box without calling the sendKeys() using Selenium?
- Execute a script when the element gets user input in HTML?
- Execute a script when a page has unloaded in HTML?
- Strange cursor placement in modal when using autofocus in Internet Explorer with HTML
- Detecting HTML click-to-call support in JavaScript
- How to place the text at the center of an Entry box in Tkinter?
- HTML autofocus Attribute

Advertisements