简体   繁体   中英

How to embed a website in my site's blog?

I have a site with a blog and using an embed code:

<embed src="https://www.timeout.com/london/things-to-do/the-best-life-drawing-classes-in-london" style="width:500px; height: 300px;"</embed>

This works fine. But when I try:

<embed src="http://anyamountofbooks.com" style="width:500px; height: 300px;"</embed>

It doesn't work.

The site exists but, when I view the page on my blog, it says, 'this site may be down.

Typically you'll want to use an <iframe> instead of<embed> to display HTML content. Take a look at this answer for some more in depth analysis. Now to the root of your problem.

If you're embedding external content into your site (such as by iframe/embed), you'll need to make sure that the protocols match:

  • An http:// website can embed both http:// and https:// content.
  • An https:// website can ONLY embed https:// content.

The http://anyamountofbooks.com website doesn't appear to have a valid SSL certificate, so you won't be able to frame it if your website is secured and accessed through https:// .

The other thing to consider is that some websites don't allow themselves to be embedded, here's on article on a couple ways to do it. The website you're trying to embed may employ one of those practices to prevent itself from being embedded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM