Iframes Can have their "src" set to display Websites or Other Content

This Iframe Displays Another Website.


This Iframe Displays This Page's CSS Stylesheet.


This Iframe Displays a Local PHP Page


The code used for index.php is below:



<!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">
    <link rel="stylesheet" href="../styles.css">
    <title>HTMl | Iframes</title>
</head>
<body>



<h1 class="lesson-h1">Iframes Can have their "src" set to display Websites or Other Content</h1>


<p>This Iframe Displays Another Website.</p>
<iframe src="https://superbrosllc.com" frameborder="0"></iframe>
<hr>
<p>This Iframe Displays This Page's CSS Stylesheet.</p>
<iframe src="../styles.css" frameborder="0"></iframe>    
<hr>
<p>This Iframe Displays a Local PHP Page</p>
<iframe src="<?php echo "hello.php"; ?>" frameborder="0"></iframe>  

<?php
      include('../show_code.php');
      show_code('index.php');
      show_code('hello.php');
?>
    
</body>
</html>

The code used for hello.php is below:



<?php

echo "<h1>Hello</h1>";
echo "This is the hello.php page.";

?>