How to Create Checkbox in html
<input type="checkbox">
A check box allowing multiple values to be selected.
How to Create Checkbox in html
program
<html>
<body>
<p> The<strong>input type="checkbox"</strong>
defines a checkbox</p>
<form action="/action_page.php">
<input type="checkbox" name="vehicle1"
<P>I have sports car</p><br>
<input type="checkbox" name="vehicle2"
<P>I have a Luxury car</p><br><br>
</form>
</body>
</html>
How to Create Checkbox in html
Explain Program
Step 1 ]
<!Doctype html>
- <!doctype html> always be the first line of any HTML document.
<!Doctype html>
- <!doctype html> always be the first line of any HTML document.
Step 2 ]
<html> and </html>
html is the root element.
<html> and </html>
html is the root element.
Step 3 ]
<body> and </body>
body is main content area.
All visible content inside to the <body> tag
<body> and </body>
body is main content area.
All visible content inside to the <body> tagStep 4]
<form action="/action_page.php">
form submitted data sent to the server-side file action page.php
Step 5]
<input type="checkbox" name="vehicle1"
value="sports car">
create first checkbox
name = vehicle1 is the identifier use send form data.
value = sport car the server checked
Step 6]
<P>I have sports car</p><br>
first checkbox
Step 7]
<input type="checkbox" name="vehicle2"
value="Luxury Car">
second checkbox
name= vehicle2 value= Luxury car
Step 8]
<input type="submit">
submit button (click submit it send data action_page.php
No comments:
Post a Comment