HTML / Element / Initial coverage

The <selectedcontent> Element

Status: Initial coverage Scope: HTML Living Standard Specification reviewed: 2026-10-21

Technical Summary

selectedcontent is an HTML element placed inside the first child button of a select. It displays cloned child nodes from the currently selected option. Its authoring content model is empty; the browser replaces its contents as selection state changes.

The copied nodes are the option's children, not its label attribute or value. The update algorithm returns early when the select has the multiple attribute.

Definition / Categories

ItemSpecification summaryCheck
MeaningShows the currently selected option's contents in the select's first-child buttonKeep choices, selection state, and display location distinct
CategoriesNoneIt is not flow, phrasing, or interactive content
ContextInside the first-child button of a selectThe button is the special first-child branch for drop-down selects
Content modelEmpty in author markup; the browser clones the selected option's child nodesDo not hand-write a second copy inside selectedcontent
DOM interfaceHTMLSelectedContentElementAn element interface exists, but it adds no dedicated role or display-value IDL attribute

Usage context

In a customizable select, the select retains the selection model and form value, while its first-child button provides the closed-state display. selectedcontent is the place inside that button where the selected option's contents appear. The button and selectedcontent are not independent page-level controls.

<label for="plan">Plan</label>
<select id="plan" name="plan">
  <button>
    <selectedcontent></selectedcontent>
  </button>
  <div>
    <option value="basic"><span>Basic</span></option>
    <option value="pro" selected>
      <span>Pro</span> <small>Recommended</small>
    </option>
  </div>
</select>

appearance: base-select is a styling feature in CSS Basic User Interface Module Level 4. Evaluate the HTML content model separately from CSS support, and measure rendering, picker, and interaction in each implemented browser and version.

Copying and updates

The HTML Standard's update steps return immediately when the select has the multiple attribute. Otherwise, each non-disabled descendant selectedcontent uses the first option in the option list whose selectedness is true. If there is no such option, its contents are cleared. Otherwise, the option's child nodes are deep-cloned and replace the current contents.

TriggerSpecification behaviorMeasurement note
Initial markup connectionAfter connection in an eligible select, update from the current selectionDo not conflate parser intermediate states with the connected result
Selection changeSelect update notifications update descendant selectedcontent elementsRecord user actions separately from selection changes made through DOM APIs
Child mutation in selected optionEach selection update clones the option's child nodesDo not infer immediate synchronization from the selection algorithm alone
Moving selectedcontentRecalculate connection conditions and queue an update microtask when eligibleMeasure movement, insertion, and removal conditions separately
multiple selectThe descendant update algorithm returns earlyDistinguish valid customizable-select markup from boundary fixtures in WPT

Boundary with label and value

selectedcontent does not run the option label algorithm or copy the form value. Its copy algorithm reads the selected option's child nodes.

InformationDefined byRelationship to selectedcontent
Choice labelThe option's label attribute or option textThe label attribute's string is not copied into selectedcontent
Display markupThe option's child nodesChild nodes are cloned for the current selection
Form valueThe option's value attribute or option value rulesIt is not copied; the select handles form submission
Source optionThe option list inside selectNodes are cloned, not moved, so the choice remains in the list

See the option page for rich option content, label/value resolution, and the text-only content model for options in datalist.

DOM Interface / disabledness

The DOM interface is HTMLSelectedContentElement and defines a constructor. The element has no dedicated content attribute or form-submission API. The specification has an internal boolean disabled state that controls whether an element participates in updates; it is set in conditions such as being inside an option or another selectedcontent element. Do not confuse this internal state with an author-facing disabled attribute or IDL property.

const selectedcontent = document.querySelector('selectedcontent');
const select = selectedcontent.closest('select');
const selectedOption = select.selectedOptions[0];

selectedcontent instanceof HTMLSelectedContentElement;
selectedcontent.innerHTML;
select.value;

selectedcontent.innerHTML reads the display nodes created by the browser. Read select.value for the application or form value; do not use display markup as that value.

Fact / Evidence

Normative claims and implementation observations are recorded separately. WPT runs without a known source revision remain partial, and browser accessibility-tree output is not generalized to platform APIs or assistive-technology speech.

Key facts and source locations
TypeFact / claimConditions / scopeStatusSource
SPECselectedcontent displays the currently selected option's contents in the select's first-child button.Customizable drop-down select content model.ReviewedHTML Standard: selectedcontent element
SPECOn update, the algorithm deep-clones the selected option's child nodes and replaces the selectedcontent contents.A non-disabled selectedcontent with a selected option.ReviewedHTML Standard: update and clone algorithms
SPECThe option's label attribute is not copied, and the descendant update algorithm returns for a multiple select.Selected-content update algorithm; option label/value resolution is separate.ReviewedHTML Standard: selectedcontent updates

Evidence

  1. HTML Standard: The selectedcontent element — definition, interface, disabledness, copying, insertion, connection, movement, and update rules
  2. HTML Standard: The select element — customizable-select content model, option list, selection, picker, and form relationships
  3. HTML Standard: The option element — option content model, label, value, and selectedness
  4. HTML Accessibility API Mappings — platform mappings for HTML elements and attributes; it has no dedicated selectedcontent entry
  5. Web Platform Tests: customizable select — selectedcontent selection, mutation, nesting, insertion, and removal cases

Implementation Evidence

Implementation evidence records the environment, test files, results, and unrun scope. The Japanese and English evidence tables are generated from docs/atlas/evidence-registry.json.

Implementation evidence registry for the selectedcontent element
TypeVerification scopeConditions to recordStatus
IMPL HTMLSelectedContentElement interface, selected option child copying, clone separation, updates, and the label boundary 2026-10-21 / Chrome UA 155.0.0.0 / Windows NT 10.0 (Win32) / Japanese locale / viewport 1280×720 / DPR 1.25. The local fixture at build-config/yugien/research-results/selectedcontent-v1/ reported 10/10 checks passed. Confirmed the interface, child copying, no immediate rewrite after editing the source option, update after selection change, and the separate label attribute and form value. CSS.supports("appearance", "base-select") returned true. Recorded at 2026-10-20T15:40:42.127Z.
Post-generation check: docs/atlas/selectedcontent-evidence-2026-10-21.md All Japanese and English Yugien and Atlas pages loaded over local HTTP with the expected lang and h1; each Atlas page displayed three evidence rows.
Partial observation (Chrome 155 / 1 environment)
WPT Four selectedcontent update, nesting, insertion, and removal WPT files / 24 subtests 2026-10-21 / Chrome UA 155.0.0.0 / Windows NT 10.0 (Win32) / wpt.live. selectedcontent.html: 4 passed, 2 failed, 1 timed out, 4 not run. selectedcontent-mutations.html: 6 passed, 2 failed. selectedcontent-nested.html: 1/1 passed. selectedcontent-insertion-removal.html: 4/4 passed. Total: 15 passed, 4 failed, 1 timed out, 4 not run. Failures involved updates after form reset / selected reassignment and parser mutation tests 6 and 8. The first promise test timed out after its interaction prompt. wpt.live did not expose the served test commit, so the revision is unknown. Details: docs/atlas/selectedcontent-evidence-2026-10-21.md

The test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version.

Partial run (4 files / revision unknown)
AAM HTML-AAM entry status, and the select button value, picker items, and separate selectedcontent node in the Chrome accessibility tree 2026-10-21 / Chrome UA 155.0.0.0 / Windows NT 10.0 (Win32). The HTML-AAM Editor’s Draft has no dedicated selectedcontent entry. The closed control was exposed as a collapsed pop-up button whose value included the selected option text. With the picker open, the tree showed an expanded pop-up button, the selected item, and the other option; it did not show a separate selectedcontent node. Windows UI Automation and screen-reader speech were not measured. docs/atlas/selectedcontent-evidence-2026-10-21.md Partial observation (Chrome accessibility tree)

Specification review and browser, WPT, and accessibility-tree observations are treated as separate evidence.

Coverage / Open Issues

  • ReviewedMeaning, context, DOM interface, option child-node copying, label/value boundary, and multiple-select update boundary
  • OpenBehavior across browsers and operating systems, complex option markup, all DOM mutation and movement conditions, and CSS appearance / picker rendering
  • OpenPlatform accessibility APIs when HTML-AAM has no dedicated mapping, screen-reader speech and interaction, and the full WPT scope

This page records initial coverage. Its results apply only to the named environments and selected tests; they do not claim complete verification of selectedcontent or every implementation.

Related surface

For a beginner-friendly explanation, see Yugien on selectedcontent. The full selection model and customizable select are covered by select; option markup and label/value behavior by option; and the first-child button's form behavior by button.