0% found this document useful (0 votes)
3 views4 pages

8th Class HTML Form Programs

The document provides HTML programs for creating various types of forms, including a basic form with text, email, and password fields, a form with radio buttons and checkboxes for user preferences, a feedback form with a dropdown menu and textarea, and a form for date selection and file uploads. Each program includes the necessary HTML structure and elements to facilitate user input. These examples serve as educational tools for understanding form creation in HTML.

Uploaded by

mansagoyal055
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

8th Class HTML Form Programs

The document provides HTML programs for creating various types of forms, including a basic form with text, email, and password fields, a form with radio buttons and checkboxes for user preferences, a feedback form with a dropdown menu and textarea, and a form for date selection and file uploads. Each program includes the necessary HTML structure and elements to facilitate user input. These examples serve as educational tools for understanding form creation in HTML.

Uploaded by

mansagoyal055
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Class:8th HTML Programs related to Form

1. Basic HTML Form

This program introduces input fields like text, email, and password.

<!DOCTYPE html>

<html>

<head>

<title>Basic Form</title>

</head>

<body>

<h2>Simple Form</h2>

<form>

Name: <input type="text" name="name"><br><br>

Email: <input type="email" name="email"><br><br>

Password: <input type="password" name="password"><br><br>

<input type="submit" value="Submit">

</form>

</body>

</html>

2. Form with Radio Buttons and Checkboxes

This teaches how to use selection options in a form.

<!DOCTYPE html>

<html>
<head>

<title>Form with Radio and Checkbox</title>

</head>

<body>

<h2>User Preferences</h2>

<form>

Gender:

<input type="radio" name="gender" value="Male"> Male

<input type="radio" name="gender" value="Female">


Female<br><br>

Hobbies:

<input type="checkbox" name="hobby" value="Reading"> Reading

<input type="checkbox" name="hobby" value="Sports"> Sports

<input type="checkbox" name="hobby" value="Music">


Music<br><br>

<input type="submit" value="Submit">

</form>

</body>

</html>

3. Form with Dropdown and Textarea

This program adds a dropdown menu and a text area for comments.
<!DOCTYPE html>

<html>

<head>

<title>Form with Dropdown and Textarea</title>

</head>

<body>

<h2>Feedback Form</h2>

<form>

Select Country:

<select name=”country”>

<option value=”India”>India</option>

<option value=”USA”>USA</option>

<option value=”UK”>UK</option>

</select><br><br>

Comments:<br>

<textarea name=”comments” rows=”4”


cols=”30”></textarea><br><br>

<input type=”submit” value=”Submit”>

</form>

</body>

</html>

4. Form with Date and File Upload

This introduces date selection and file uploads.


<!DOCTYPE html>

<html>

<head>

<title>Form with Date and File Upload</title>

</head>

<body>

<h2>Upload Your Details</h2>

<form>

Date of Birth: <input type="date" name="dob"><br><br>

Upload File: <input type="file" name="file"><br><br>

<input type="submit" value="Submit">

</form>

</body>

</html>

You might also like