Html & Css / Pemrograman Web · February 6, 2023

File index.html dan style.css

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Abdul Rahman - Belajar HTML CSS 2023</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <!--UNTUK HEADER-->
    <div class="header">
        <h1>Abdul Rahman, M.Kom</h1>
        <p>Website informasi lengkap tentang Abdul Rahman.</p>
    </div>

    <!--UNTUK NAVBAR-->
    <div class="navbar">
        <a href="#">Home</a>
        <a href="#">About Me</a>
        <a href="#">Portfolio</a>
    </div>

    <!--UNTUK ROW-->
    <div class="row">
        <!--UNTUK ISI-->
        <div class="kolomkiri">
            kolom kiri
        </div>
        <div class="kolomkanan">
            kolom kanan
        </div>
    </div>

    <!--UNTUK FOOTER-->
    <div class="footer">
        FOOTER
    </div>
</body>
</html>
body {
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.header {
    text-align: center;
}

.navbar {
    overflow: hidden;
    background-color: #000000;
}

.navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

.kolomkiri {
    background-color: #0224ff;
    float: left;
    width: 75%;
    height: 100px;
}

.kolomkanan {
    background-color: #f717ff;
    float: right;
    width: 25%;
    height: 100px;
}

.footer {
    background-color: #ff0000;
    text-align: center;
}