practicle2 code
practicle2 code
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Restaurant Delight</title>
<link rel="stylesheet" href="styles.css"> <!-- External CSS -->
<style>
/* Internal CSS */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}
header {
background-color: #ff5722;
color: white;
padding: 15px 10px;
text-align: center;
}
nav ul {
list-style-type: none;
padding: 0;
text-align: center;
background-color: #333;
}
nav ul li {
display: inline;
margin: 0 15px;
}
nav ul li a {
color: white;
text-decoration: none;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px;
margin-top: 20px;
}
</style>
</head>
<body>
<!-- Header Section -->
<header>
<h1>Welcome to Restaurant Delight</h1>
</header>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" required><br><br>
<label for="message">Message:</label><br>
<textarea id="message" name="message" rows="4"
required></textarea><br><br>
</html>
===============================================================================
external css
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
}
header {
background-color: #ff5722;
color: white;
padding: 20px;
text-align: center;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
nav ul li {
display: inline;
margin: 0 15px;
}
nav ul li a {
text-decoration: none;
color: white;
padding: 10px 15px;
}
nav ul li a:hover {
background-color: #575757;
border-radius: 5px;
}
section {
padding: 20px;
margin: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h1, h2 {
color: #ff5722;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
table, th, td {
border: 1px solid #ddd;
}
th, td {
padding: 10px;
text-align: left;
}
th {
background-color: #ff5722;
color: white;
}
img {
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
form {
display: flex;
flex-direction: column;
gap: 10px;
}
input, textarea {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
input[type="submit"] {
background-color: #ff5722;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #e64a19;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px 0;
position: relative;
bottom: 0;
width: 100%;
}