This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6953 - clearly specify that misnested tags are an authoring-conformance error
Summary: clearly specify that misnested tags are an authoring-conformance error
Status: CLOSED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 07:26 UTC by Michael[tm] Smith
Modified: 2010-10-04 13:58 UTC (History)
4 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2009-05-26 07:26:20 UTC
I suspect I must be missing something, but neither in the "Writing HTML documents" section nor in any other section of the spec can I find any text stating that authors must not misnest tags.

I recognize that the tree-construction section of the draft does specify that cases of misnested tags are parse errors. But there doesn't seem to be any corresponding part of the spec which clearly states that misnested tags are an authoring-conformance error (or anything that describes what misnesting of tags is).
Comment 1 Ian 'Hixie' Hickson 2009-05-26 07:29:06 UTC
What do you mean by mis-nest tags?
Comment 2 Michael[tm] Smith 2009-05-26 07:30:58 UTC
(In reply to comment #1)
> What do you mean by mis-nest tags?

<b>a<i>b</b>c</i>

Comment 3 Ian 'Hixie' Hickson 2009-05-26 07:36:13 UTC
The Writing HTML section requires that the contents of an element be placed between its start and end tags. In your example, that requirement is not met.
Comment 4 Julian Reschke 2009-05-26 09:23:10 UTC
As far as I can tell, the requirement is met. In

  <b>a<i>b</b>c</i>

"ab" is placed between "<b>" and "</b>", and "bc" is placed between "<i>" and "</i>".

So maybe the statement in the aforementioned section should be clarified / expanded a bit.
Comment 5 Ian 'Hixie' Hickson 2009-05-26 09:43:20 UTC
"<i>...</i>" is part of the contents of the <b> element in this example (presumably; I'm guessing as to what DOM is being serialised here).
Comment 6 Julian Reschke 2009-05-26 09:47:20 UTC
How exactly does this statement help a reader who's trying to figure out whether tags needs to be properly nested?
Comment 7 Ian 'Hixie' Hickson 2009-05-26 10:36:16 UTC
Any reader who goes through the Writing HTML section step by step cannot ever come out with a result that has "misnested" tags.

That section, however, is not intended for people who won't come to that conclusion; for them, I would recommend reading tutorials such as Lachy's document.


Having said that, what concrete change would you recommend to the spec to address this concern?
Comment 8 Maciej Stachowiak 2010-03-14 14:48:11 UTC
This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
  http://dev.w3.org/html5/decision-policy/decision-policy.html

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.