0% found this document useful (0 votes)
9 views

Program 2

The HTML code collects student details like name, email, date of birth, gender, course, address, phone and photo using a form with table elements. The form contains input fields like text, email, date, radio buttons, select dropdown and textarea to enter the student details along with a submit button to submit the form.

Uploaded by

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

Program 2

The HTML code collects student details like name, email, date of birth, gender, course, address, phone and photo using a form with table elements. The form contains input fields like text, email, date, radio buttons, select dropdown and textarea to enter the student details along with a submit button to submit the form.

Uploaded by

kavyashreen3321
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Question 2: Create an HTML code that collects the following student details: name,

email, date of birth, gender, and course, address, phone and photo. Use the table tag
to organize the form elements.

<!DOCTYPE html>
<html>
<head>
<title>Student Details Form</title>
</head>
<body>
<h1>Student Details Form</h1>
<form>
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name" required></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="email" name="email" required></td>
</tr>
<tr>
<td>Date of Birth:</td>
<td><input type="date" name="dob" required></td>
</tr>
<tr>
<td>Gender:</td>
<td>
<input type="radio" name="gender" value="male" required>Male
<input type="radio" name="gender" value="female" required>Female
</td>
</tr>
<tr>
<td>Course:</td>
<td>
<select name="course" required>
<option value="">Select a course</option>
<option value="CSE">CSE</option>
<option value="AIML">AI&ML</option>
<option value="CSD">CSD</option>
<option value="ISE">ISE</option>
</select>
</td>
</tr>
<tr>
<td>Address:</td>
<td><textarea name="address" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<td>Phone:</td>
<td><input type="tel" name="phone" pattern="[0-9]{10}" required></td>
</tr>
<tr>
<td>Photo:</td>
<td><input type=" le" name="photo"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Submit"></td>
</tr>
</table>
</form>
</body>
</html>

Output
fi

You might also like