Latihan 5 Pemrograman Web (E) - Latihan CSS
Tugas 5 Latihan CSS
Nama: Reynandriel Pramas Thandya
NRP: 5025231113
Kelas: Pemrograman Web (E)
Disuruh untuk membuat website kursus dengan HTML dan CSS seperti pada contoh. Buat dengan tampilan yang menarik.
Link Tampilan: https://reynandrielpt.github.io/Latihan-5-PWEB/
Code HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GeeksforGeeks Portfolio</title>
<link rel="stylesheet" href="Tugas 4.css">
</head>
<body>
<header>
<h1>GeeksforGeeks</h1>
<p>A Computer Science Portal for Geeks</p>
</header>
<section class="portfolio">
<h2>Portfolio</h2>
<div class="card-container">
<div class="card">
<h3>HTML</h3>
<p>HTML stands for Hyper Text Markup Language. It is used to design
the web page using markup language. HTML is the combination
of Hypertext and ...</p>
<a href="#">HTML Tutorials</a>
</div>
<div class="card">
<h3>CSS</h3>
<p>Cascading Style Sheets, fondly referred to as CSS, is a simply
design language intended to simplify the process of making
web pages presentable.
CSS ...</p>
<a href="#">CSS Tutorials</a>
</div>
<div class="card">
<h3>PHP</h3>
<p>The term PHP is an acronym for PHP: Hypertext Preprocessor.
PHP is a server-side scripting language designed specifically
for web development.
PHP ...</p>
<a href="#">PHP Tutorials</a>
</div>
<div class="card">
<h3>JavaScript</h3>
<p>JavaScript was developed by Brendan Eich in 1995. At first,
it was called LiveScript but was later name to JavaScript.
JavaScript is the muscle of t...</p>
<a href="#">JavaScript Tutorials</a>
</div>
</div>
</section>
</body>
</html>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
header {
background-color: #4caf50;
color: #fff;
padding: 20px;
text-align: center;
}
.portfolio {
padding: 20px;
}
.portfolio h2 {
text-align: center;
margin-bottom: 20px;
}
.card-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
}
.card {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
width: 200px;
padding: 15px;
text-align: center;
}
.card h3 {
background-color: #4caf50;
color: #fff;
margin: -15px -15px 10px -15px;
padding: 10px;
border-radius: 8px 8px 0 0;
}
.card p {
text-align: justify;
color: #333;
font-size: 14px;
margin: 10px 0;
}
.card a {
display: inline-block;
margin-top: 10px;
text-decoration: none;
color: #4caf50;
border: 1px solid #4caf50;
border-radius: 4px;
padding: 5px 10px;
transition: background-color 0.3s, color 0.3s;
}
.card a:hover {
background-color: #4caf50;
color: #fff;
}
@media (max-width: 768px) {
.card-container {
justify-content: center;
}
.card {
width: 90%;
max-width: 300px;
}
header {
padding: 15px;
}
.portfolio h2 {
font-size: 1.5em;
}
}
@media (max-width: 480px) {
.card {
width: 100%;
padding: 10px;
}
.card h3 {
font-size: 1.2em;
}
.card p {
font-size: 12px;
}
}
Dokumentasi Tampilan:
Komentar
Posting Komentar