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 24802 - Children elements of <option>
Summary: Children elements of <option>
Status: NEW
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-25 15:11 UTC by Andrea Rendine
Modified: 2014-02-25 16:39 UTC (History)
1 user (show)

See Also:


Attachments

Description Andrea Rendine 2014-02-25 15:11:56 UTC
The <option> tag has "text" as content model, so it cannot contain any tag. Using a syntax like <option>text <b>node</b></option> is invalid in both HTML and XHTML. But the error reports are different.

Error: Stray start tag b. [...]
Error: Stray end tag b. [...]
(HTML)

XHTML element b not allowed as child of XHTML element option in this context. (Suppressing further errors from this subtree.) [...]
Contexts in which element b may be used:
Where phrasing content is expected.
Content model for element option:
Text.

Actually the error is the same. <option> is one of the few tags with content model:text flagging children elements as invalid (it doesn't happen in <title> and <textarea>), but I think the report should be clear.