{"id":9357,"date":"2022-10-06T05:06:08","date_gmt":"2022-10-06T05:06:08","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9357"},"modified":"2022-10-06T05:06:08","modified_gmt":"2022-10-06T05:06:08","slug":"html-autofocus-attribute","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/html-autofocus-attribute\/","title":{"rendered":"HTML Autofocus Attribute"},"content":{"rendered":"\n<p>The HTML\u00a0autofocus\u00a0attribute is a boolean attribute, which defines that an\u00a0&lt;input>\u00a0element must automatically get focus when the page loads.<\/p>\n\n\n\n<p>The\u00a0autofocus\u00a0attribute is new in\u00a0HTML5.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"syntax-2\">Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;input autofocus&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Applies to<\/td><td>HTML &lt;input&gt; element.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-span-class-attribute-autofocus-span-attribute-5\">Example of the HTML&nbsp;autofocus&nbsp;attribute:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document.&lt;\/title&gt;\n  &lt;body&gt;\n    &lt;h1&gt;Example of the HTML \"autofocus\" attribute.&lt;\/h1&gt;\n    &lt;form action=\"#\"&gt;\n      Name: &lt;input type=\"text\" name=\"fname\" autofocus&gt;&lt;br&gt;\n      Surname: &lt;input type=\"text\" name=\"lname\"&gt;&lt;br&gt;\n      &lt;input type=\"submit\"&gt;\n    &lt;\/form&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The HTML\u00a0autofocus\u00a0attribute is a boolean attribute, which defines that an\u00a0&lt;input>\u00a0element must automatically get focus when the page loads. The\u00a0autofocus\u00a0attribute is new in\u00a0HTML5. Syntax Applies to HTML &lt;input&gt; element. Example of the HTML&nbsp;autofocus&nbsp;attribute:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[327],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9357"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=9357"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9357\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=9357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=9357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=9357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}