CARA BUAT HTML VIDEO PENDEK DI BLOGSPOT



Berikut adalah contoh kode HTML untuk menampilkan video pendek di Blogspot. Anda bisa menggunakan tag <video> HTML5 untuk menampilkan video langsung di halaman blog Anda. Video dapat diunggah ke platform seperti YouTube, Google Drive, atau langsung di-host di server Anda.


Kode HTML untuk Video Pendek:


<!DOCTYPE html>
<html lang="en">
<head>
  <style>
    /* Styling untuk video container */
    .video-container {
      width: 100%;
      max-width: 600px; /* Sesuaikan lebar video */
      margin: 0 auto;
      text-align: center;
    }

    /* Video styling */
    video {
      width: 100%;
      height: auto;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    /* Deskripsi video */
    .video-description {
      margin-top: 10px;
      font-size: 16px;
      color: #333;
    }
  </style>
</head>
<body>

  <!-- Container Video -->
  <div class="video-container">
    <!-- Video -->
    <video controls>
      <source src="https://www.example.com/video-pendek.mp4" type="video/mp4">
      <source src="https://www.example.com/video-pendek.ogg" type="video/ogg">
      Browser Anda tidak mendukung tag video.
    </video>

    <!-- Deskripsi Video -->
    <div class="video-description">
      Ini adalah contoh video pendek yang ditampilkan di Blogspot.
    </div>
  </div>

</body>
</html>

----------------

Cara Menggunakan di Blogspot:

  1. Login ke akun Blogspot Anda.

  2. Buka postingan atau halaman yang ingin Anda edit.

  3. Pilih mode HTML (bukan mode Compose).

  4. Tempelkan kode di atas ke dalam editor HTML.

  5. Ganti src pada tag <source> dengan URL video Anda.

    • Jika video di-host di Google Drive, pastikan Anda mengubah izin berbagi menjadi "Publik" dan gunakan link unduhan langsung.

    • Jika video di YouTube, gunakan kode embed dari YouTube (lihat contoh di bawah).

  6. Ganti teks deskripsi di dalam .video-description sesuai kebutuhan.

  7. Simpan atau publikasikan postingan/halaman.


Contoh URL Video:

  • Hosting Sendiri:

  • <source src="https://www.example.com/video-pendek.mp4" type="video/mp4">

  • Google Drive:

    • Unggah video ke Google Drive, ubah izin berbagi menjadi "Publik", dan dapatkan link unduhan langsung.

    • <source src="https://drive.google.com/uc?export=download&id=FILE_ID" type="video/mp4">

YouTube:

  • Gunakan kode embed dari YouTube:

  • <iframe width="100%" height="315" src="https://www.youtube.com/embed/VIDEO_ID" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Fitur:

  1. Video Controls: Video memiliki tombol play, pause, volume, dan fullscreen.

  2. Responsif: Video akan menyesuaikan lebar container.

  3. Deskripsi: Deskripsi video dapat ditambahkan di bawah video.

  4. Multi-Format: Mendukung format video MP4, OGG, dan WebM.


Contoh Video dari YouTube:

Jika Anda ingin menggunakan video dari YouTube, berikut adalah contoh kode embed:

<div class="video-container">

  <iframe width="100%" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

  <div class="video-description">

    Ini adalah contoh video pendek dari YouTube.

  </div>

</div>


Hasil:

  • Video akan ditampilkan di halaman blog Anda dengan kontrol play, pause, dan fullscreen.

  • Deskripsi video akan muncul di bawah video.

  • Video akan responsif dan menyesuaikan lebar layar pengguna.

Semoga membantu! 😊 Traktir kopi seiklasnya donasi

Share:

Labels

Media Global.site

Diberdayakan oleh Blogger.

Featured post

Doa Awal Tahun Baru Islam 1 Muharram 1447 H

Doa Awal Tahun Baru Islam 1 Muharram 1447 H اللَّهُمَّ أَنْتَ الأَبَدِيُّ القَدِيمُ الأَوَّلُ وَعَلَى فَضْلِكَ العَظِيمِ وَكَرِيمِ جُوْدِكَ ...

Labels

Blog Archive