NAMA : SYAEFULLAH MUMIN
NIM : 231011750228
KELAS : 01SIFE001
UAS PEMROGRAMAN WEB 1
JAWABAN
1. Halaman Utama (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homepage - My Website</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Welcome to My Website!</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>Welcome to Our Website</h2>
<p>This is the homepage of our website. Lorem ipsum dolor sit amet, consectetur
adipiscing elit.</p>
<img src="images/home.jpg" alt="Homepage Image">
</section>
</main>
<footer>
<p>© 2024 My Website. All rights reserved.</p>
</footer>
</body>
</html>
Halaman About (about.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About - My Website</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>About Us</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>About Our Company</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dignissim
feugiat urna vel facilisis.</p>
<img src="images/about.jpg" alt="About Image">
</section>
</main>
<footer>
<p>© 2024 My Website. All rights reserved.</p>
</footer>
</body>
</html>
Halaman Services (services.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Services - My Website</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Our Services</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>Our Services Offered</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce interdum arcu
vel felis lacinia, sed tincidunt.</p>
<table>
<tr>
<th>Service</th>
<th>Description</th>
</tr>
<tr>
<td>Web Development</td>
<td>Creating beautiful and functional websites.</td>
</tr>
<tr>
<td>Graphic Design</td>
<td>Designing logos, banners, and other graphic elements.</td>
</tr>
<tr>
<td>SEO Services</td>
<td>Improving search engine rankings.</td>
</tr>
</table>
</section>
</main>
<footer>
<p>© 2024 My Website. All rights reserved.</p>
</footer>
</body>
</html>
Halaman Gallery (gallery.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gallery - My Website</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Photo Gallery</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>Our Photo Gallery</h2>
<p>Check out some of our amazing photos.</p>
<div class="gallery">
<img src="images/gallery1.jpg" alt="Gallery Image 1">
<img src="images/gallery2.jpg" alt="Gallery Image 2">
<img src="images/gallery3.jpg" alt="Gallery Image 3">
<img src="images/gallery4.jpg" alt="Gallery Image 4">
</div>
</section>
</main>
<footer>
<p>© 2024 My Website. All rights reserved.</p>
</footer>
</body>
</html>
Halaman Contact (contact.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us - My Website</title>
<link rel="stylesheet" href="styles.css">
<script src="script.js" defer></script>
</head>
<body>
<header>
<h1>Contact Us</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>Contact Information</h2>
<p>Fill out the form below to contact us.</p>
<form id="contactForm">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required><br><br>
<label for="message">Message:</label><br>
<textarea id="message" name="message" rows="4" cols="50"
required></textarea><br><br>
<button type="submit">Submit</button>
</form>
</section>
</main>
<footer>
<p>© 2024 My Website. All rights reserved.</p>
</footer>
</body>
</html>
CSS (styles.css)
/* styles.css */
/* Reset CSS */
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Basic Styling */
body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #f0f0f0;
padding: 20px;
}
header {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
}
nav ul {
list-style-type: none;
padding: 0;
text-align: center;
}
nav ul li {
display: inline;
margin-right: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
main {
margin: 20px 0;
padding: 0 20px;
}
section {
margin-bottom: 20px;
}
footer {
text-align: center;
background-color: #333;
color: #fff;