{"id":101,"date":"2024-02-07T16:35:15","date_gmt":"2024-02-07T16:35:15","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=101"},"modified":"2024-02-29T18:19:37","modified_gmt":"2024-02-29T18:19:37","slug":"define-html-checkboxes","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/","title":{"rendered":"Define Html checkboxes?"},"content":{"rendered":"\n<p>The checkbox is shown as a square box that is ticked (checked) when activated.Checkboxes are used to let a user select one or more options of a limited number of choices. In HTML, User can create a checkbox using the <code>&lt;input><\/code> tag with the <code>type<\/code> attribute set to <code>\"checkbox\"<\/code>. Here&#8217;s the basic syntax for creating a checkbox.<br><strong> Code:-<\/strong><br>&lt;!DOCTYPE html><br>&lt;html><br>&lt;body><br>&lt;h1>Show Checkboxes&lt;\/h1><br>&lt;form action=&#8221;\/action_page.php&#8221;><br>&lt;input type=&#8221;checkbox&#8221; id=&#8221;vehicle1&#8243; name=&#8221;vehicle1&#8243; value=&#8221;Bike&#8221;><br>&lt;label for=&#8221;vehicle1&#8243;> I have a bike&lt;\/label>&lt;br><br>&lt;input type=&#8221;checkbox&#8221; id=&#8221;vehicle2&#8243; name=&#8221;vehicle2&#8243; value=&#8221;Car&#8221;><br>&lt;label for=&#8221;vehicle2&#8243;> I have a car&lt;\/label>&lt;br><br>&lt;input type=&#8221;checkbox&#8221; id=&#8221;vehicle3&#8243; name=&#8221;vehicle3&#8243; value=&#8221;Boat&#8221;><br>&lt;label for=&#8221;vehicle3&#8243;> I have a boat&lt;\/label>&lt;br>&lt;br><br>&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;><br>&lt;\/form><br>&lt;\/body><br>&lt;\/html><br><strong>Output:-<\/strong> <br><br><br><br><strong> What is Html Radio Button?<\/strong><br>The HTML is used to define a Radio Button. Radio Buttons are used to let the user select exactly one option from a list of predefined options. Radio Button input controls are created by using the \u201cinput\u201d element with a type attribute having the value as \u201cradio\u201d.<br>The element may have additional attributes like name to group-related radio buttons and value to assign a specific value to the selected option.<br>Note: The \u201cvalue\u201d attribute in radio buttons assigns a distinct identifier for each option. While not visible to users, this value is sent to the server upon submission, helping identify the selected radio button.<br><\/p>\n\n\n\n<p><strong>Code Example<\/strong> <strong>:-<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;HTML code for creating radio buttons>\n&lt;form>\n&lt;p>Please select your gender:&lt;\/p>\n&lt;Each radio button has a name attribute with the same value, so they belong to the same group -->\n&lt;Each radio button has a value attribute that specifies the data to be sent to the server when the form is submitted>\n&lt;Each radio button has a label element that displays the text next to the button>\n&lt;input type=\"radio\" id=\"male\" name=\"gender\" value=\"male\">\n&lt;label for=\"male\">Male&lt;\/label>&lt;br>\n&lt;input type=\"radio\" id=\"female\" name=\"gender\" value=\"female\">\n&lt;label for=\"female\">Female&lt;\/label>&lt;br>\n&lt;input type=\"radio\" id=\"other\" name=\"gender\" value=\"other\">\n&lt;label for=\"other\">Other&lt;\/label>\n&lt;\/form>\n&lt;\/body>\n&lt;\/html>\n\n<strong>Code Output :-<\/strong>\n\n\n\n\n\n\n\n\n\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">html select button ?<br><\/h4>\n\n\n\n<p>The element is used to create a drop-down list. The<br>element is most often used in a form, to collect user input.The name attribute is needed to reference the form data after the form is submitted (if you omit the name attribute, no data from the drop-down list will be submitted).The id attribute is needed to associate the drop-down list with a label.The tags inside the element define the available options in the drop-down list.<br>Certainly! In HTML, you can create a drop-down list using the <code>&lt;select><\/code> element. This is commonly used within forms to allow users to select a value from a list of options. Let me show you an example:<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;label for=\"cars\">Choose a car:&lt;\/label>\r\n&lt;select name=\"cars\" id=\"cars\">\r\n&lt;option value=\"volvo\">Volvo&lt;\/option>\r\n&lt;option value=\"saab\">Saab&lt;\/option>\n&lt;option value=\"mercedes\">Mercedes&lt;\/option>\r\n&lt;option value=\"audi\">Audi&lt;\/option>\r\n&lt;\/select>\nIn this example:\r\n- The `&lt;select>` element defines the drop-down list.\r\n- The `&lt;option>` tags inside the `&lt;select>` element specify the available options.\r\n- The `name` attribute is needed to reference the form data after submission.\r\n- The `id` attribute associates the drop-down list with a label.\r\nAnther example , You can also group options using `&lt;optgroup>` tags if needed:\r\n&lt;label for=\"cars\">Choose a car:&lt;\/label>\r\n&lt;select name=\"cars\" id=\"cars\">\r\n&lt;optgroup label=\"Swedish Cars\">\r\n&lt;option value=\"volvo\">Volvo&lt;\/option>\r\n&lt;option value=\"saab\">Saab&lt;\/option>\r\n&lt;\/optgroup>\r\n&lt;optgroup label=\"German Cars\">\r\n&lt;option value=\"mercedes\">Mercedes&lt;\/option>\r\n&lt;option value=\"audi\">Audi&lt;\/option>\r\n&lt;\/optgroup>\n&lt;\/select>\n\n<strong> Define Html Hidden fields?<\/strong>\nThe &lt;input type=\"hidden\"> defines a hidden input field. A hidden field lets web developers include data that cannot be seen or modified by users when a form is submitted. A hidden field often stores what database record that needs to be updated when the form is submitted.\r\nIn HTML, A hidden input field is used to include data that cannot be seen or modified by users when a form is submitted. It's often employed to store information related to database records that need updating upon form submission.\r\nHere's how you create a hidden input field using the `&lt;input>` tag:\r\n&lt;input type=\"hidden\" id=\"custId\" name=\"custId\" value=\"3487\">\r\nIn this example:\r\n- `type=\"hidden\"` specifies that it's a hidden input field.\r\n- `id` and `name` attributes provide identifiers for the field.\r\n- `value` attribute holds the actual data you want to include (in this case, the value.\n\n\n\r<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The checkbox is shown as a square box that is ticked (checked) when activated.Checkboxes are used to let a user select one or more options of a limited number of choices. In HTML, User can create a checkbox using the &lt;input> tag with the type attribute set to &#8220;checkbox&#8221;. Here&#8217;s the basic syntax for creating &#8230; <a title=\"Define Html checkboxes?\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\" aria-label=\"Read more about Define Html checkboxes?\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-html-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Define Html checkboxes? - XOps Tutorials!!!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Define Html checkboxes? - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"The checkbox is shown as a square box that is ticked (checked) when activated.Checkboxes are used to let a user select one or more options of a limited number of choices. In HTML, User can create a checkbox using the &lt;input&gt; tag with the type attribute set to &quot;checkbox&quot;. Here&#8217;s the basic syntax for creating ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-07T16:35:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-29T18:19:37+00:00\" \/>\n<meta name=\"author\" content=\"ritik hansda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ritik hansda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\"},\"author\":{\"name\":\"ritik hansda\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\"},\"headline\":\"Define Html checkboxes?\",\"datePublished\":\"2024-02-07T16:35:15+00:00\",\"dateModified\":\"2024-02-29T18:19:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\"},\"wordCount\":390,\"commentCount\":0,\"articleSection\":[\"HTML Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\",\"name\":\"Define Html checkboxes? - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"datePublished\":\"2024-02-07T16:35:15+00:00\",\"dateModified\":\"2024-02-29T18:19:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Define Html checkboxes?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\",\"name\":\"ritik hansda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g\",\"caption\":\"ritik hansda\"},\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/ritikhansda\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Define Html checkboxes? - XOps Tutorials!!!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/","og_locale":"en_US","og_type":"article","og_title":"Define Html checkboxes? - XOps Tutorials!!!","og_description":"The checkbox is shown as a square box that is ticked (checked) when activated.Checkboxes are used to let a user select one or more options of a limited number of choices. In HTML, User can create a checkbox using the &lt;input> tag with the type attribute set to \"checkbox\". Here&#8217;s the basic syntax for creating ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2024-02-07T16:35:15+00:00","article_modified_time":"2024-02-29T18:19:37+00:00","author":"ritik hansda","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ritik hansda","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/"},"author":{"name":"ritik hansda","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7"},"headline":"Define Html checkboxes?","datePublished":"2024-02-07T16:35:15+00:00","dateModified":"2024-02-29T18:19:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/"},"wordCount":390,"commentCount":0,"articleSection":["HTML Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/","url":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/","name":"Define Html checkboxes? - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"datePublished":"2024-02-07T16:35:15+00:00","dateModified":"2024-02-29T18:19:37+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/define-html-checkboxes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Define Html checkboxes?"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7","name":"ritik hansda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g","caption":"ritik hansda"},"url":"https:\/\/www.xopsschool.com\/tutorials\/author\/ritikhansda\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":1,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":102,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/101\/revisions\/102"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}