{"id":9339,"date":"2022-10-06T04:59:51","date_gmt":"2022-10-06T04:59:51","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9339"},"modified":"2022-10-06T04:59:51","modified_gmt":"2022-10-06T04:59:51","slug":"html-accept-attribute","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/html-accept-attribute\/","title":{"rendered":"HTML accept Attribute"},"content":{"rendered":"\n<p>The HTML&nbsp;accept&nbsp;attribute specifies the type of file that the server accepts. The submission is possible through a file upload.<\/p>\n\n\n\n<p>You can only use this attribute on the\u00a0&lt;input>\u00a0element. It is only used with\u00a0<kbd>&lt;input\u00a0type=\"file\"><\/kbd>.<\/p>\n\n\n\n<p>The&nbsp;accept&nbsp;attribute must not be used as a validation tool. File uploads must be validated on the server.<\/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 accept=\"file_extension | audio\/* | video\/* | image\/* | media_type\"&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-span-class-attribute-accept-span-attribute-4\">Example of the HTML&nbsp;accept&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;\/head&gt;\n  &lt;body&gt;\n    &lt;form action=\"\/form\/submit\" method=\"post\"&gt;\n      &lt;input type=\"file\" name=\"Image\" accept=\"image\/*\"&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&nbsp;accept&nbsp;attribute specifies the type of file that the server accepts. The submission is possible through a file upload. You can only use this attribute on the\u00a0&lt;input>\u00a0element. It is only used with\u00a0&lt;input\u00a0type=&#8221;file&#8221;>. The&nbsp;accept&nbsp;attribute must not be used as a validation tool. File uploads must be validated on the server. Syntax Example of the HTML&nbsp;accept&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\/9339"}],"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=9339"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9339\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=9339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=9339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=9339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}