views:

342

answers:

2

line after IFRAME is not visible in both IE and FF. refer the below code and let me know whether I am doing anything wrong.

<html>
<body>
line before iframe <br />
<iframe src="about:blank" />
<br /> line after iframe
</body>
</html>
A: 

create the iframe with a separate close tag:

<html>
<body>
line before iframe <br />
<iframe src="about:blank"></iframe>
<br /> line after iframe
</body>
</html>

There are some tags (iframe and textarea come to mind) which don't like it when you use their compact form.

Zack
yes it works. what is the reason behind this? Is there any W3C standard for this?
afin
A: 

you need to close the iframe tag. otherwise the content that comes after it is considered "things to show" when iframe is not supported.

(by the way, i think if you use XHTML to write the <iframe ... /> then IE will take it as HTML instead. IE doesn't understand XHTML as XHTML. It understands it as HTML.)

動靜能量
Yes it works after I put separate end tag. I thought both self end and separate end tag are same, I believe it is applicable for all elements. why it is not working with IFRAME, Is there any W3C standard/documentation for this?
afin
please see update above
動靜能量