Skip to main content
  1. Posts/

Cara Membuat iFrame HTML

·1 min·
html php html
Table of Contents

iFrame adalah teknik html yang memungkinkan Anda untuk melakukan embed data website seperti text, gambar hingga video dalam sebuah halaman website.

Elemen iFrame berfungsi untuk mengambil konten dari sebuah sumber dan menampilkan datanya sesuai dengan url sumber yang digunakan. iFrame tidak hanya digunakan untuk membuat satu halaman layout website, namun juga bisa digunakan untuk mengisi bagian tertentu pada website

Script iFrame
#

Contoh script iframe.

<html lang="en-US">
<head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <meta name="description" content="iframe adalah">
        <meta name="keywords" content="iframe">
        <meta name="author" content="iframe">
        <meta name="theme-color" content="#3498db" />
        <link rel="shortcut icon" type="image/png" href="http://web1.example.com/favicon.ico" />
        <title>iframe</title>
</head>
<body>
<iframe src="http://web1.example.net" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
    "Your browser does not support iframes"
</iframe>
</body>
</html>

Sesuaikan <iframe src dan beberapa bagian meta lainnya.

Jika Anda menggunakan script dengan format PHP.

<?php

echo 
'<html lang="en-US">
script iframe
</html>';

Note
#

Pastikan untuk source website tidak terdapat header x-frame-options: SAMEORIGIN karena membuat tampilan web muncul error.

Related

Error PHP - move_uploaded_file() Unable to move file from tmp to dir
·1 min
php php
Install Nginx dengan PHP-FPM dan Userdir
·9 mins
nginx centos linux php nginx
Kirim Email dengan PHPMailer
·3 mins
php php
Mengamankan Server dari Eksploitasi PHP Shell
·1 min
php linux php
Menambahkan Security Headers pada PHP
·1 min
php php
Install Apache dengan PHP-FPM dan Userdir
·3 mins
apache ubuntu linux php apache