How to embed a “live” web page in WordPress blog posts

There are times you need to show a “live” web page in your post, not just a screenshot of that web page. With an embedded web page, readers can use the mouse to scroll up/down or left/right to explore the actual web page.

Here’s a simple solution. To do this, all you need to do is to tweak some simple codes:
<object data= width=”650″ height=”500″> <embed src= width=”650″ height=”500″> </embed></object>

How to tweak the code

  1. replace the two instances of “” with the actual URL of the web page you want to embed
  2. change the width and height to meet the need of your post (650 px works best for the default post width of my blog)
  3. copy and paste the tweaked code into the Text editor of your post

Here’s the tweaked code to embed CNN home page (Remember, you need to paste the tweaked code in the Text editor, not the Visual editor, of the new post window):
<object data= width=”650″ height=”500″> <embed src= width=”650″ height=”500″> </embed></object>

How to add a border to the embed web page

You may want to add a border to the embedded web page so that it stands out better, then you need to tweak another simple code:

<div style=”border: thin #000000 solid; width:650px;”>embed code</div>

If you are familiar with CSS, then the code is self-explanatory to you. But if you don’t know what CSS is, don’t panic, you can literally copy and paste the code above to add a thin black border to any embedded web page – all you need to do is to replace “embed code” with the tweaked code you just created.

Here’s the complete code to embed the CNN homepage with a thin black border (Note again, you need to do this in the Text editor)

<div style=”border: thin #000000 solid; width:650px;”><object data= width=”650″ height=”500″> <embed src= width=”650″ height=”500″></embed></object></div>

Possible issues you may have

  • This method works with self-hosted WordPress; I haven’t tested if it works with the free blog.
  • The embedded web page cannot shrink to fit the (shorter) width of your blog post, so consider embedding a web page which has its major contents along the left side of the page, e.g., another blog post. That said, you can always scroll horizontally with any embedded web page though.
  • If you don’t know what an Text editor is: when you create a new post, by default you are in the Visual editor window; but look at the upper right corner of the editing window – there is a Text tab next to the Visual tab, click the Text tab and you are in Text editor.
  • This is important: once you are in Text editor, you should not switch back to the Visual editor; because if you do, the code you entered will be interpreted differently by the editor and will NOT display properly when you preview.
  • Here’s one more thing: if you copied and edited the sample codes but things don’t work out, try retyping all the quotation marks directly in the Text editor.

Want to learn more about web programming? Check out these popular books at Amazon:

Related posts:

About Mu Lin

Dr. Mu Lin is a digital journalism professional and educator in New Jersey, United States. Dr. Lin manages an online marketing company. He also manages MulinBlog Online J-School (, a free online journalism training program, which offers courses such as Audio Slideshow Storytelling; Introduction to Social Media Marketing; Writing for the Web; Google Mapping for Communicators; Introduction to Data Visualization; Introduction to Web Metrics and Google Analytics.
This entry was posted in Writing for the web. Bookmark the permalink.

99 Responses to How to embed a “live” web page in WordPress blog posts

  1. mycaddisfly says:

    How or can I increase the visible size? It works however it is hard to read

  2. Pingback: How To Embed Any Web Page Inside a Website Article | Social Media k-12 |

  3. Pingback: How To Embed Any Web Page Inside a Website Article | Mobile Websites vs Mobile Apps |

  4. Pingback: How To Embed Any Web Page Inside a Website Article | ITyPA première approche |

  5. Tyrone says:

    This “object” code no longer works in Internet Explorer version 10 onwards. It works in all the other browsers. It is obviously time for all these “old information” sites to be taken down.

  6. Edsbali says:

    I use width=”500″ and height=”1000″, but only only displayed small frame i my page, not as the same width or height.

  7. Pingback: How to embed a web page in a WordPress blog pos...

  8. nicehero60 says:

    You are Master Thank you very much.
    i used another HTML code for this
    Page Builder than insert a new columb
    a new text HTML
    Copy and past this code
    change only “” to “”

    Your browser does not support iframes.

  9. Pingback: Embed your listing gallery into your blog posts. | Seattle Home Photography | Real Estate & Architecture

  10. Nicholas says:

    How about flexible/full width?

  11. mentor081 says:

    please help me for embedding a webpage in my free wordpress blog webpost.i desperately need it.

  12. Cristina says:

    Thanks A Lot i can Successfully did it .

  13. heydmh says:

    I love this website! I learn so much and I have been significantly improving my own blog. Thank you!

  14. ajsmith988 says:

    OMG THIS IS AWESOME! thank you so much for the helpful tip!

  15. Pingback: How To Embed Any Web Page Inside a Website Arti...

  16. Pingback: How to embed a web page in a WordPress blog pos...

  17. oorvani says:

    any idea if this still works.. trying to do this on my wp blog (free one), but doesn’t seem to make any difference. please help.

  18. nikki says:

    I am attempting to change the size (width and height), but even when I change the numbers, it remains the same size. Is it something I’m doing wrong?

  19. Gamal says:

    i tried to embed but it did not work

  20. shyuyaku says:

    I have used your code and it embeds the page fine, but for some reason I cannot change the size of the image. It is set to a small size and cannot be fixed. I have changed to width and height to no avail and have tried everything suggested here:

    Would love any help on this issue.
    You can see the small embed here:

    Much appreciated,

    • Mu Lin says:

      There seems to be some invalid codes in your page HTML: width=””800px″” height=””800px″”; take out the extra quotation marks; if it still does not work, try manually type up all the quote marks.
      Besides, double check the string of codes in your html with the demo in my post; you’ll see it looks different than the format in my demo.

    • Michael Olsen says:

      His code is really overcomplicated. I stripped it down to the necessities and simply added some css to change the size of the window:

      Having the width set to 100% will make it adapt to the screen size.

  21. Brilliant, just what I needed!

  22. Mike says:

    Thank you for your generosity! Great help

  23. edgewood58 says:

    The code works for me but I would love to put in my enewsletter and have it link to my wordpress pages. When I use the code it puts the pages inside the small area, how do I have it open in the parent window?

  24. funkymonty says:

    The website itself is too large within the object. How can I shrink the content inside to fit

  25. Luiz says:

    Hi, I am trying this to embed a google drive folder with shared link inside my webpage. The code worked fine for or some other sites I tried, but when I type the URL of the google drive share link (the share folder) it goes blank. Any ideas why ?

  26. Raphael says:

    Thanks for the helpful tip, Mr. Lin. It’s just what I was wondering about today to add to my site.

  27. Llew Dowley says:

    awesome worked perfectly!

  28. You may use this WordPress plugin to embed sites and posts

  29. Thanks, but it’s not working on my wordpress blog … so what can I do…? please help me…

  30. HB says:

    Sorry for the former post, Here is the location were I have been testing your code
    The page that I supplied in the former post, was a different attempt using a different code, with that one I can change the height but can only reduce the width.
    Thanks again for any help

    • Mu Lin says:

      When I check the source codes for that page, I see instances such as:
      width=””650″” height=””500″”
      Note the double quotation marks there? They are invalid and being substituted by the browser with default dimensions.
      So, in your editor, make sure you only have one set of quotation marks, and they should be the straight marks, not the curly marks.

  31. HB says:

    Hello Mu Lin;
    Thank you very much for your help. I did follow your advice and it did work.
    The strange thing is that I copied and pasted your code and I have no idea where the double quotes came from….However I copied and pasted your code again, I have double checked it and this is what I see in the source: , but as you see still the CNN page is not showing accordingly.
    Thanks again for your help.

  32. wsoldner says:


    I can not seem to get this code to work. I have a self-hosted account running Theme X. (

  33. To change the size, the correct code does not need the quote(width=650 height=500, or width=100% … etc).

  34. Akshay says:

    Try out WP Web Scraper ( if you are on WordPress and are looking some really advanced embeds

  35. I got this web page from my buddy who shared with
    me on the topic of this web site and now this time I am visiting this site and reading very informative content
    at this time.

  36. Mark Wright says:

    I am trying to embed a grocery store ad section into a couponing site…. it does not work with the martins ad

    Eagle works


    martins does not

  37. James says:

    Is there a way to post just a specific area of the site? For Example, the content is far to the right to be seen without scrolling to the right. is there a way to trim the margin on the left to center the content?

  38. ashclicks says:

    why is that not working on wordpress

  39. n says:

    hoe do you do this with an https page

  40. jelliott2014 says:

    This solution is just what I needed! Thank you. I am embedding an html site that I created, so I’ve been able to successfully adjust the content width to fit 100% of the body area within my WP page (which has a sidebar). Looks great.

    One question: While the page is great with a full monitor, the html is cut off when viewed in an iPad. Would be great to have it scale appropriately (the Theme does). I have full control over the embedded html and the WP theme.

    Any ideas? Work in progress here:

  41. Having read this I believed it was extremely enlightening.

    I appreciate you taking the time and energy to put this short article together.
    I once again find myself personally spending a significant amount of time
    both reading and commenting. But so what, it was still worth

  42. Hello very cool website!! Guy .. Excellent .. Superb .. I will bookmark your blog and take the feeds also?
    I’m glad to find numerous helpful info right here within the submit,
    we’d like develop extra techniques in this regard, thanks for sharing.
    . . . . .

  43. Saoyai says:

    why is that not working on wordpress Thank you!

  44. I have checked but not working on my website.

    I don’t know why? Anyone can help me?

  45. Mu Lin, thank you so much. I am a remedial massage therapist working inside a large clinic, and needed to link the clinic’s online booking system to my own website. This solution means users no longer have to leave my site and go to the clinic’s site in order to book my services — I just embedded the booking page into my site.

    I’m really happy, this has been bugging me for ages. Thank you so much, it makes it much much easier for clients to book me!

  46. How can you add a hyperlink feature to the window of the embedded live website? — So that when someone clicks it, they are navigated to that website?


  47. Deepak says:

    Hi I’m paste ur code but it’s size is small how can create a big siiz

  48. icconsultant says:

    this is amazing, thanks

  49. gonzaromano says:

    Hi! Great tip!! I have a question about it though: is it legal?
    Please don´t take my question as anything rude; what I´m trying to say is if by using this tool I am “stealing” traffic from the webpage I embed in my own site.

    I would really much like to use it but do not want any kind of trouble with other website owners!

    Thanks in advance for your answer!

    • Mu Lin says:

      Like many tips out there on the web, the use of it at the discretion of individual users. That said, no, this embed will not bring any traffic to your site. Take this tutorial article as an example – it has been around for years, but my stats never show any referral traffic from the CNN site.

  50. Thank you! Worked great… did a little tweaking with the code, but shows up how it should now! I appreciate your getting me in the right direction.

  51. Tom says:

    Ive got a more specific question. Id like to embed a password protected website into a website. Ive got an account on a website and I would like to add this to my own website so that when other people create an account on my website, theyll get instant access to that website without me having to enter the password – it would already be there. Is there a code which allows that? Something like website name, website loging details and once its on visibe on a website, everyone has access to it.
    Please help.
    Thank you very much.

  52. Pingback: 腕時計 レディース セイコー SEIKO セイコー5 SEIKO 5 自動巻き 腕時計 SYMH85J1 クリスマス

  53. Melvin says:

    When I use a secured website with https:// it doesn’t show. It shows up as a large empty box. Is there a way to fix this ?
    Example :

    Thanks in advance.

  54. Hi, I can’t get this to work on my Word Press at all? I’m using the Harmonic Theme ( on a self hosted domain

    Any ideas?

    I just want to blog with this website

    When I try to do it using your code all I get is a hyperlink instead?

    Please help – thanks


  55. Robert says:

    Mu, I tried your code to embed a link to real estate listing results and the results page with ten listings in a row embedded perfectly just as if you looked at the link results in a browser. It looks as natural as a web scraped page of listings I have on another website – like it was designed into the page with no i frame looking scroll bars.

    However, if I click one of the listings to view its listing details, the page of listings turns blank white and no listing detail comes up? If I click the back arrow in my browser I get the embedded page of listings again?
    What could be going on that prevents the listing detail view from pulling up?

  56. Lora says:

    Really helpful. Thank you!

  57. LemonPie says:

    Thank you, it works great

  58. Hello to every single one, it’s genuinely a good for me to go to see this website,
    it includes important Information.

  59. Hi there! This is my first visit to your blog!

    We are a group of volunteers and starting a new project in a community in the same niche.
    Your blog provided us valuable information to work
    on. You have done a outstanding job!

  60. says:

    Thanks for all your information. I have forked it…To remove the 2 vertical scrollbars type in css:

    html {
    overflow-y: hidden;

  61. vineeth m says:

    Is there any WordPress plugin for the purpose? Embed wordpress post from one website to another Plugin.

    I have seen some plugin to embed infographics

  62. blizzardfox says:

    I look on the page and the security policies of firefox and chrome stop the page from showing, any solution?

  63. Blocked by Content Security Policy

    This page has a content security policy that prevents it from being loaded in this way.

    Firefox prevented this page from loading in this way because the page has a content security policy that disallows it.

    THIS METHOD WILL NOT WORK ON NEWER BROWSERS when you visit a site with SSL

  64. Thanks for the highly informative article. I’ll definitely try to incorporate your suggestiong into my website. Highly appreciate it!


  65. moumik143 says:

    It’s Not working for my this Site..

  66. mcjackuart says:

    it worked with my website but not on the other one. Please why?

  67. Pingback: How To Publish 6 Blog Posts Every Week. – theblog

  68. naveen says:

    Hi, absolutely got tons of value from your post. Please i have 2 quick questions.
    1. What is the number of plugins every blogger shouldn’t exceed? I currently have about 18 installed, would you consider that number outrageous. Please could you also check out my site and offer me a
    2. Your font is really beautiful. would you suggest plugins that would give me beautiful fonts just like yours?
    Finally, would you spare a few seconds to check this site and offer me your candid advice

  69. I was looking for the solution to embed web page in word press and finally i got the solution here. Thanks for the help.

  70. I am very thankfull to you for give us a more knowledge..

  71. syarif says:

    His code is really overcomplicated. I stripped it down to the necessities and simply added some css to change the size of the window.

  72. Nice explanation, actually I haven’t get proper knowledge about embed, this blog helped me very much. Thank you

Leave a Reply