Skip to content
The Chat Archive
gpt-3.5-turbo-0613· OpenAI WildChat-4.8M (AI2)

Create code for an html to embed a website.

  1. User

    Create code for an html to embed a website.

  2. Assistant

    To embed a website into an HTML page, you can use an iframe tag. Here's an example code showing how to embed a website using an iframe:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Embedded Website</title>
    </head>
    <body>
        <h1>Embedded Website</h1>
    
        <iframe src="https://example.com" title="Embedded Website" width="100%" height="500px"></iframe>
    
        <p>This is some text below the embedded website.</p>
    </body>
    </html>
    

    In this example, replace https://example.com with the URL of the website you want to embed. The title attribute provides a title for the embedded iframe. The width and height attributes determine the dimensions of the embedded website, but you can adjust them accordingly.

    You can copy the above code into an HTML file, save it with a .html extension (e.g., embed.html), and open it in a web browser to see the embedded website.