<iframe></iframe> works every time, <iframe/> only once a page.

RESOLVED DUPLICATE of bug 158667

Status

()

Core
Layout: HTML Frames
RESOLVED DUPLICATE of bug 158667
15 years ago
15 years ago

People

(Reporter: Michael Hartle, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

During development I found out that using <iframe src="somepage.html"/> only
works  once per page; in the attached example, using <iframe/> at a certain
point in a page leads to the rest of the page not being displayed. When using
<iframe></iframe> instead, it works like a charm (so far) :-)

Reproducible: Always

Steps to Reproduce:
1. Use <iframe/> self-closing tag instead of <iframe></iframe> tag pair in a page.

Actual Results:  
The rest of the page after the <iframe/> tag is not displayed, at least not in
the attached example provided.

Expected Results:  
<iframe/> should behave like <iframe></iframe> - at least according to my
understanding, but I may be wrong.
(Reporter)

Comment 1

15 years ago
Created attachment 127741 [details]
Test case showing the same example page using <iframe/> and <iframe></iframe>

Comment 2

15 years ago
This is invalid.  You can't use XML syntax in HTML.  While <iframe/> is
self-closing in XML, in HTML the "/" is just an unknown attribute that is
ignored (which is why you usually add a space for compatability reasons, <iframe
/>).

I took your testcase, converted it to XHTML, and it works as expected.

See also http://www.w3.org/TR/xhtml1/#guidelines

*** This bug has been marked as a duplicate of 158667 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Comment 3

15 years ago
>You can't use XML syntax in HTML.
Er, I should say, you can't always use XML syntax in HTML.  The link I gave, for
the XHTML spec Appendix C, gives the rules for writing XHTML that can be
processed as HTML successfully.
You need to log in before you can comment on or make changes to this bug.