Berikut adalah contoh kode HTML dan CSS untuk membuat portal ke WhatsApp:

HTML:

<!DOCTYPE html>
<html>
<head>
    <title>Portal ke WhatsApp</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <div class="container">
        <h1>Portal ke WhatsApp</h1>
        <form action="https://api.whatsapp.com/send" method="GET">
            <input type="text" name="phone" placeholder="Nomor Telepon" required>
            <textarea name="text" placeholder="Pesan Anda" required></textarea>
            <button type="submit">Kirim Pesan</button>
        </form>
    </div>
</body>
</html>

CSS (style.css):

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

Pastikan Anda menyimpan file HTML di dalam folder yang sama dengan file CSS, dan menghubungkan file CSS dengan tag <link> pada bagian <head> di HTML.

Kode HTML dan CSS untuk Portal WhatsApp

原文地址: http://www.cveoy.top/t/topic/vGW 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录