Question about text after iframe

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"/> after iframe </body> </html> 

But I see the text "before the iframe", but I do not see the text "after the iframe".

Could you tell me how I can fix this?

Thanks.

+7
html
source share
2 answers

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

 <iframe src="" width="" height=""></iframe> 
+14
source share

Iframeters cannot be self-closing; they need a private tag. One of the features of HTML.

In other words, do the following: <iframe src="blah"></iframe> , not that: <iframe src="blah" />

The same goes for script and textarea tags, and possibly others that I'm forgetting about at the moment.

+1
source share

All Articles