I am trying to embed two websites in one page like YouTube and Google using div tags and the links in between the div tags....is there any way this could work?
You're looking for the <iframe> tag.
Try using Iframes with the links set to your desired pages
Generally the iframe-tag is used to embed whole websites. (see MDN article) But appearantly youtube & google have blocked that option. (see when running the snippet below)
<iframe
width="500"
height="100"
src="https://www.wikipedia.org">
</iframe>
<iframe
width="500"
height="100"
src="https://www.google.com">
</iframe>
<iframe
width="500"
height="100"
src="https://www.youtube.com">
</iframe>
Their is three types which I define to add any other website in your webpage.
Note: But nowadays Google, Facebook, and other lots of websites do not allow you to load their website or webpage on your Webpage for some security issues.
<iframe src="https://www.example.com" height="200" width="300"></iframe>
<object data="https://www.example.com" width="400" height="300" type="text/html">
Alternative Content
</object>
<embed src="https://www.example.com" width=200 height=200 onerror="alert('URL invalid !!');" />
Related
I want to embed a Youtube video on my website. I have tried the following code but it does show the video or any controllers:
<iframe width="400" height="300"
src="https://www.youtube.com/watch?v=z-QgsXkYqjc"
frameborder="1"
allowfullscreen></iframe>
Anyone know what I am doing wrong?
Much appreciated.
Change the src to this:
src="https://www.youtube.com/embed/z-QgsXkYqjc"
I would like to display another web sides inside my mvc view.
Can anyone help me how to do this issue? I tried using iframe but i could not succeed it.
You can use <iframe> or <embed> or <object> tags in HTML5 to display 3rd other websites URL inside your application.
Example:
<iframe class="embed-responsive-item" src="http://modernpathshala.com" width="600" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<object type="text/html" data="External_URL" width="500px" height="500px">
</object>
Note : replace External_URL with your url
I am trying to embed a PHP page in another HTML page using the embed tag, however on firefox it shows up as just a grey box. It works fine on google chrome. According to a google search, <embed> is deprecated and they suggest using the <object> tag however is it possible to use that with text/html and not an image or swf/media ?
My current code: <embed src="post.php" height="35" width="850">
You could try using the following:
<object data=http://www.example.com/page.php width="850" height="35">
<embed src=http://www.example.com/page.php width="850" height="35"> </embed>
Error: The page could not be embedded.
</object>
I want to show a youtube video in html 4. For that, I am using iframe. But the content of iframe is not showing.
<iframe frameborder="1" width="420" height="345" src="https://www.youtube.com/watch?v=C8kSrkz8Hz8"></iframe>
FYI: I am using Firefox 29.0 and Chrome 35.0. Both browsers are showing the same result.
Change your src with //www.youtube.com/embed/C8kSrkz8Hz8
your code shoud look like this
<iframe frameborder="1" width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8"></iframe>
Find code under each video on youtoube at Share menu.
When you try to put the whole YouTube page into an iframe, it sends a HTTP header called X-Frame-Options with the SAMEORIGIN value, which tells the browser, that the page can only be displayed in a frame on the same origin as the page itself.
You should use the provided embed code (you can find it below every YouTube video), which is also an iframe, but with a different URL. It will only show the player.
In this case, the embed code would be:
<iframe width="560" height="315" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
replace you Iframe with this one. this works for you.
<iframe width="640" height="390" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
missing attributes are: frameborder="0", allowfullscreen
You should change the youtube URL to remove the "s" so it looks like this:
<iframe width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="1" allowfullscreen></iframe>
You should also be able to embed a youtube video from the page. Please see the screenshot attached:
I tried it this way and worked for me. Changing your src="https://www.youtube.com/embed/C8kSrkz8Hz8"
following the other parameters.
I am trying to insert a iframe on my website, http://freefreemarkets.com, that allows me to insert the website showing what I am selling on eBay.
I have never created an iframe before.
<iframe src="http://www.website.com"></iframe>
And you can edit how you want by adding stuff like:
width="400" height="215" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" etc..
You need to use an iframe, by specifying the src attribute:
<iframe src="http://www.example.com"></iframe>
Some websites doesn't support to be embedded in iframe, be careful.