CSharpBeginner CSharpBeginner - 1 year ago 60
HTML Question

iframe element hide my page below

I have a simple html page with iframe and text.

Why I cant see the text: "Test" inside

What I'm doing wrong at my .html file?

When I removed the
elemnt i can see "Test"



<p align="right">
<iframe id="serviceFrame" src="http://www.cnn.com" width="100" height="52" frameborder="0"/>

<p align="left">

Answer Source

You cannot use self-closing (<iframe ... />) tags with an iframe.

The / at the and is ignored and the <iframe> tag is still open, so your <p> tag is within your iframe.

You need to correctly close your iframe and use </iframe>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download