putting iframe into html

Posted on 2011-05-04
Last Modified: 2012-05-11
hi i would like to put another web address in this html using an iframe? if possible? the site i want to put in is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en">
<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
body {
margin:0; padding:0; border:0;
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<div id="container">
<p>This is some HTML content</p>

thank you so much as always
Question by:jonathanduane2010
    LVL 3

    Expert Comment

    sure you can put it in HTML body, example iframe:

    <iframe src="" width="400" height="300">
    LVL 9

    Accepted Solution

    you can add this wherever you need it inside the <body> tag:-
      <iframe src="" id="iframe1" height="200px" width="300px" frameborder="yes">

    Open in new window

    LVL 19

    Expert Comment

    Iframes are deprecated, will not be supported in HTML5 and are a constant source of trouble with different browsers.

    If you want to load a page inside a page I recommend you to load an external petition through AJAX inside a DIV container.

    Author Comment

    how would one do that???
    LVL 19

    Expert Comment

    If you use jQuery it will be as simply as:

         <div id="primaryContainer">
               Here goes my main content
        <div id="externalContainer">

    Then include a .js file like this:

    $(document).ready(function () {

    This should load you a page with "Here goes my main content" and Google's page just behind.

    Author Comment

    the reasaon i am using this is to do with the new facebook coding.

    Basically they are using apps that are with Iframes, so i am now pointing it to

    which works fine, but when i try and view through one of the tabs in facebook i get the following

    Method Not Allowed
    The requested method POST is not allowed for the URL /facebook/index.html.

    Apache/1.3.37 Server at Port 80

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    The viewer will learn how to dynamically set the form action using jQuery.
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now