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 27319 - Examples: comments when omitting start and end tags
Summary: Examples: comments when omitting start and end tags
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#the-htm...
Whiteboard: [good first bug]
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-13 19:55 UTC by contributor
Modified: 2015-12-04 10:43 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2014-11-13 19:55:11 UTC
Specification: https://html.spec.whatwg.org/multipage/semantics.html
Multipage: https://html.spec.whatwg.org/multipage/#the-html-element
Complete: https://html.spec.whatwg.org/#the-html-element
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
neither Validator nor any browser got a problem with immediately followed
comments when not defining start-/ and end-tags

Posted from: 77.187.84.131 by senol.veli@gmail.com
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2014-11-13 23:52:34 UTC
Can you elaborate?
Comment 2 Simon Pieters 2014-11-14 09:15:55 UTC
I assume this is about "Tag omission in text/html:"

The "problem" is that the comment ends up at a different place in the DOM.

Compare
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3294
vs
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3295

and
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3296
vs
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3297

The spec says that tags can only be omitted if doing so does not change the resulting DOM. But if you're OK with the changed DOM then it's fine. It's equivalent to first editing the document to move the tags to where they can be omitted and then omitting them.
Comment 3 senol.veli 2014-11-27 01:03:14 UTC
Thanks, this is the information I was looking for, the DOM is a different one, so one should care, even if there is no error given back from a validator.
Comment 4 Ian 'Hixie' Hickson 2014-11-28 04:18:15 UTC
I guess maybe an example would help.
Comment 5 senol.veli 2014-12-02 13:30:06 UTC
Yeas, I think also taht an example would help people to catch this point.

May be an example that could be used in same manner for head-/ and body-element. may be showing what happens or just mentioning the result in DOM.

regards
Comment 6 Simon Pieters 2015-12-04 10:43:03 UTC
https://github.com/whatwg/html/pull/383