Advanced HTML & CSS
This commit is contained in:
65
Week-02/Day_02/index.html
Normal file
65
Week-02/Day_02/index.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Advanced HTML & CSS - Simple Form</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<nav class="nav">
|
||||
<ul>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#product">Product</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<form class="form" id="userForm">
|
||||
<h3>User Form</h3>
|
||||
|
||||
<input type="text" id="name" name="name" placeholder="Name" required>
|
||||
<input type="email" id="email" name="email" placeholder="Email" required>
|
||||
<input type="text" id="city" name="city" placeholder="City">
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
|
||||
<div class="display">
|
||||
<h3>Entered Details</h3>
|
||||
<p>Name: <span id="displayName">______</span></p>
|
||||
<p>Email: <span id="displayEmail">______</span></p>
|
||||
<p>City: <span id="displayCity">______</span></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="pagination">
|
||||
<a href="#" class="prev">«</a>
|
||||
<a href="#" class="page active">1</a>
|
||||
<a href="#" class="page">2</a>
|
||||
<a href="#" class="page">3</a>
|
||||
<a href="#" class="next">»</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
document.getElementById('userForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
var name = document.getElementById('name').value.trim();
|
||||
var email = document.getElementById('email').value.trim();
|
||||
var city = document.getElementById('city').value.trim();
|
||||
|
||||
document.getElementById('displayName').textContent = name || '______';
|
||||
document.getElementById('displayEmail').textContent = email || '______';
|
||||
document.getElementById('displayCity').textContent = city || '______';
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
79
Week-02/Day_02/style.css
Normal file
79
Week-02/Day_02/style.css
Normal file
@@ -0,0 +1,79 @@
|
||||
body {
|
||||
font-family: Arial;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 20px;
|
||||
max-width: 700px;
|
||||
margin: 40px auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
background: white;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.display {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
background: white;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
input, button {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
header {
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
|
||||
padding: 12px 0;
|
||||
}
|
||||
header .nav ul {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
header .nav a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Footer / Pagination */
|
||||
footer {
|
||||
margin: 30px auto 50px;
|
||||
max-width: 700px;
|
||||
text-align: center;
|
||||
}
|
||||
.pagination {
|
||||
display: inline-flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
.pagination a {
|
||||
display: inline-block;
|
||||
padding: 6px 10px;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
.pagination a.active {
|
||||
background: #007acc;
|
||||
color: #fff;
|
||||
border-color: #007acc;
|
||||
}
|
||||
Reference in New Issue
Block a user