tags:

views:

17

answers:

2

Hi,

I have this test html page, I tried it in both chrome and firefox.

<html>
<body>

before iframe

<iframe width="300" height="300" src="http://www.yahoo.com"/&gt;

after iframe

</body>
</html>

But what i see is I see the text 'before iframe', but I don't see the text 'after iframe'.

Can you please tell how can I fix it?

Thank you.

A: 

An iframe is not a self closing element, specify the end tag.

<iframe src="" width="" height=""></iframe>
meder
Nitpick: it's self-closing (or self-terminating) tag, not self-closing element :)
no
A: 

Iframes can't be self-closing, they need a closing tag. One of the oddities of HTML.

In other words, do this: <iframe src="blah"></iframe>, not this: <iframe src="blah" />

Same goes for script and textarea tags and probably others I'm forgetting at the moment.

no