0

Why does this code break this page on chrome. It seems that the rest of the content won't render if I self close the iframe tag. If I add start iframe tag and end iframe tag, it doesn't do this.

<body>
  <hr />
  <div> 
  <iframe src="https://www.posttestserver.com/"             
         style="width:400px; height: 400px"
         border="0"
         frameborder="0"/>
  </div>  
  <br />
  <div>   
  <iframe src="https://www.posttestserver.com/"    
         scrolling="no"
         border="0"
         frameborder="0"
         style="width:200px; height: 200px"
         />
  </div> 

https://jsfiddle.net/7ya5rhm2/

Berlin Brown
  • 11,504
  • 37
  • 135
  • 203
  • You haven't self-closed the iframe tag. You've put a `/` at the end of the start tag. HTML doesn't have self-closing tags. – Quentin Dec 10 '15 at 14:48

1 Answers1

0

From what I know, and after looking at this page, only empty HTML elements such as BR or IMG can be closed with /> rather than a full closing tag.

iamjawa
  • 129
  • 2
  • 13