Learn HTML Checkbox Input Type with Easy Examples
how to create checkbox in html
What is the HTML Checkbox Tag
Syntax :
<input type="checkbox" name="name" value="value">
Importabt Attribute
type ="checkbox" ➡ Defines checkbox
name ➡ Groups checkboxes
value ➡ Data sent to server
checked ➡ pre selected option
program
Learn HTML Checkbox Input Type with Easy Examples
Explain Program
<!DOCTYPE html>
- document type declaration.
- browser help this is an HTML5 document.
<!DOCTYPE html>
- document type declaration.
- browser help this is an HTML5 document.
. <html> ... </html>
- root element of the HTML document.
- <html> tag is part of the web page.
. <html> ... </html>
- root element of the HTML document.
- <html> tag is part of the web page.
<body> ... </body>
- HTML document that holds visible content on the page.
- A heading (<h2>)
- An input button (<input type="button">)
- list tag
- ext...
<body> ... </body>
- HTML document that holds visible content on the page.
- A heading (<h2>)
- An input button (<input type="button">)
- list tag
- ext...
-
A paragraph describing that the
<input type="checkbox">element creates a checkbox. -
The
strongtag is used to make bold text – it highlights"input type="checkbox".
<input type="submit">
This creates a button to submit the form.
When clicked, it sends the selected checkbox values to /action_page.php.
</body>
</html>
Closes the html form, body, and HTML document.


Post a Comment