Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views3 pages

Form Validation

The document contains an HTML registration form with fields for username, email, password, and confirm password, along with error messages for required fields. It is styled using CSS to create a visually appealing layout with a purple background and a centered form. The form includes a submit button and is designed to provide user feedback through error indications for input validation.

Uploaded by

sheeladikshitha
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)
7 views3 pages

Form Validation

The document contains an HTML registration form with fields for username, email, password, and confirm password, along with error messages for required fields. It is styled using CSS to create a visually appealing layout with a purple background and a centered form. The form includes a submit button and is designed to provide user feedback through error indications for input validation.

Uploaded by

sheeladikshitha
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
You are on page 1/ 3

1.

HTML file

<html>

<head>

<link rel="stylesheet" href="f.css">

<title>REGISTER</title>

</head>

<body>

<div class="container">

<form action=" " id="form">

<h1>REGISTER</h1>

<div class="input-group">

<label for="username">USERNAME</label>

<input type="text" id="username" name="username"/>

<div class="error">required</div>

</div>

<div class="input-group">

<label for="email">EMAIL</label>

<input type="text" id="email" name="email"/>

<div class="error">required</div>

</div>

<div class="input-group">

<label for="password">PASSWORD</label>

<input type="text" id="password" name="password"/>

<div class="error">required</div>

</div>

<div class="input-group">

<label for="confirmpassword">CONFIRM PASSWORD</label>


<input type="text" id="confirmpassword" name="password">

<div class="error">required</div>

</div>

<button type="submit">SUBMIT</button>

</form>

2. body
3. {
4. background:purple;
5. margin:50;
6. //font-family:'poppins',times new roman;
7. }
8. #form
9. {
10. width:400px;
11. margin:10vh auto 0 auto;
12. background:whitesmoke;
13. border-radius: 20px;
14. padding: 30px;
15. }
16. h1
17. {
18. text-align:center;
19. color:purple;
20. }
21. #form button
22. {
23. background:purple;
24. color:white;
25. padding:10px;
26. cursor:pointer;
27. font-size:20px;
28. width:100%;
29. margin:20px 0px;
30. }
31. .input-group
32. {
33. display:flex;
34. flex-direction:column;
35. margin-bottom: 15px;
36. padding:5px;
37. }
38. .input-group input
39. {
40. border-radius: 5px;
41. font-size:20px;
42. margin-top:5px;
43. padding:10px;
44. }
45. .error
46. {
47. color:red;
48. .input-group.sucess input
49. {
50. border-color:green
51. }
52. .input-group.error input
53. {
54. border-color:red
55. }
56.
57. }

You might also like