Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions creating forms/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Simple Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
padding: 40px;
}

h2 {
text-align: center;
color: #333;
}

form {
background-color: #fff;
max-width: 500px;
margin: auto;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

label {
display: block;
margin-top: 10px;
margin-bottom: 5px;
color: #555;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}

input[type="submit"] {
background-color: #4caf50;
color: white;
padding: 12px 20px;
margin-top: 20px;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
font-size: 16px;
}

input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<h2>Registration Form</h2>

<form action="/submit" method="post">
<label for="name">First Name:</label>
<input type="text" id="name" name="name" required />

<label for="surname">Surname:</label>
<input type="text" id="surname" name="surname" required />

<label for="age">Age:</label>
<input type="number" id="age" name="age" min="0" required />

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

<label for="email">Email:</label>
<input type="email" id="email" name="email" />

<label for="message">Message:</label>
<textarea id="message" name="message" rows="4"></textarea>

<input type="submit" value="Submit" />
</form>
</body>
</html>
92 changes: 86 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,93 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>Simple Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
padding: 40px;
}

h2 {
text-align: center;
color: #333;
}

form {
background-color: #fff;
max-width: 500px;
margin: auto;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

label {
display: block;
margin-top: 10px;
margin-bottom: 5px;
color: #555;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}

input[type="submit"] {
background-color: #4caf50;
color: white;
padding: 12px 20px;
margin-top: 20px;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
font-size: 16px;
}

input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<h2>Registration Form</h2>

<form action="/submit" method="post">
<label for="name">First Name:</label>
<input type="text" id="name" name="name" required />

<label for="surname">Surname:</label>
<input type="text" id="surname" name="surname" required />

<label for="age">Age:</label>
<input type="number" id="age" name="age" min="0" required />

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

<label for="email">Email:</label>
<input type="email" id="email" name="email" />

<label for="message">Message:</label>
<textarea id="message" name="message" rows="4"></textarea>

<input type="submit" value="Submit" />
</form>
</body>
</html>
Loading