Open Bug 686503 Opened 9 years ago Updated 6 years ago

HTML not rendered properly when span tag is used


(Core :: DOM: HTML Parser, defect)

6 Branch
Windows XP
Not set





(Reporter: oneskywalker49, Unassigned)



(2 files)

Attached file spanned.html
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Build ID: 20110902133214

Steps to reproduce:

Composed a web page

Actual results:

Firefox 6.0.2 is not rendering HTML properly when span tag is used.  Microsoft Internet Explorer 8 and prior versions of Firebox do render the HTML properly.  Using Firefox and IE on Windows XP.

Expected results:

Specifications via span tag should have been respected.  See comments in attached file.
Attachment #559995 - Attachment mime type: text/plain → text/html
There is an unclose <a name="Example1">, which has to get closed when the <a href="" target="_blank"> is parsed.  That involves closing the <span class="mknorm" as well.

Over to parser, but I believe the new behavior is what the HTML5 spec calls for.  It also matches WebKit, and I believe matches the IE10 platform preview.
Component: General → HTML: Parser
QA Contact: general → parser
I would assume the <span> is automatically closed because <p> is not a valid child of <span>.  You'll want to use <div> for this.

-<span>'s only valid children are "Phrasing Content": see "content model" of
-<p> is not "Phrasing Content":

Chrome is also matching Firefox's behavior on this one.
You need to log in before you can comment on or make changes to this bug.