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

Sample Code

Uploaded by

madhanrajan567
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Sample Code

Uploaded by

madhanrajan567
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Here's a simple HTML program for a hospital application form:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hospital Application Form</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
form {
max-width: 400px;
margin: auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 10px;
background-color: #f9f9f9;
}
label {
display: block;
margin-bottom: 5px;
}
input, select, textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
background-color: #007BFF;
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
border-radius: 5px;
}
button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h2>Hospital Application Form</h2>
<form action="#" method="post">
<label for="fullName">Full Name:</label>
<input type="text" id="fullName" name="fullName" placeholder="Enter your
full name" required>

<label for="age">Age:</label>
<input type="number" id="age" name="age" placeholder="Enter your age"
required>

<label for="gender">Gender:</label>
<select id="gender" name="gender" required>
<option value="">Select your gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>

<label for="contact">Contact Number:</label>


<input type="tel" id="contact" name="contact" placeholder="Enter your
contact number" required>

<label for="address">Address:</label>
<textarea id="address" name="address" rows="4" placeholder="Enter your
address" required></textarea>

<label for="symptoms">Symptoms/Reason for Visit:</label>


<textarea id="symptoms" name="symptoms" rows="4" placeholder="Describe your
symptoms or reason for visit" required></textarea>

<button type="submit">Submit</button>
</form>
</body>
</html>

Features:

1. Responsive Design: The form adjusts to different screen sizes.

2. Validation: Required fields ensure all necessary information is filled.

3. User-Friendly UI: Includes placeholders and clear labels for po better


usability.

You might also like