--- id: 6145f14f019a4b0adb94b051 title: Step 36 challengeType: 0 dashedName: step-36 --- # --description-- All'interno del primo elemento `div.answer`, annida un elemento `select` obbligatorio con tre elementi `option`. Dai al primo elemento `option` un attributo `value` del valore di `""` e il testo `Select an option`. Dai al secondo elemento `option` un `value` del valore di `yes` e il testo `Yes`. Dai al terzo elemento `option` un `value` del valore di `no` e il testo `No`. # --hints-- Dovresti annidare un elemento `select` all'interno del primo elemento `div.answer`. ```js assert.exists(document.querySelector('div.answer > select')); ``` Dovresti annidare tre elementi `option` all'interno dell'elemento `select`. ```js assert.equal(document.querySelectorAll('div.answer > select > option')?.length, 3); ``` Dovresti dare al primo elemento `option` un `value` del valore di `""`. ```js assert.equal(document.querySelector('div.answer > select > option:nth-child(1)')?.value, ''); ``` Dovresti dare al primo elemento `option` il testo `Select an option`. ```js assert.equal(document.querySelector('div.answer > select > option:nth-child(1)')?.textContent, 'Select an option'); ``` Dovresti dare al secondo elemento `option` un `value` del valore di `yes`. ```js assert.equal(document.querySelector('div.answer > select > option:nth-child(2)')?.value, 'yes'); ``` Dovresti dare al secondo elemento `option` il testo `Yes`. ```js assert.equal(document.querySelector('div.answer > select > option:nth-child(2)')?.textContent, 'Yes'); ``` Dovresti dare al terzo elemento `option` un `value` del valore di `no`. ```js assert.equal(document.querySelector('div.answer > select > option:nth-child(3)')?.value, 'no'); ``` Dovresti dare al terzo elemento `option` il testo `No`. ```js assert.equal(document.querySelector('div.answer > select > option:nth-child(3)')?.textContent, 'No'); ``` Dovresti dare a `select` un attributo `required`. ```js assert.isTrue(document.querySelector('div.answer > select')?.required); ``` # --seed-- ## --seed-contents-- ```html Accessibility Quiz

HTML/CSS Quiz

Student Info

HTML

1

The legend element represents a caption for the content of its parent fieldset element

2

A label element nesting an input element is required to have a for attribute with the same value as the input's id

CSS

--fcc-editable-region--
--fcc-editable-region--
``` ```css body { background: #f5f6f7; color: #1b1b32; font-family: Helvetica; margin: 0; } header { width: 100%; height: 50px; background-color: #1b1b32; display: flex; } #logo { width: max(100px, 18vw); background-color: #0a0a23; aspect-ratio: 35 / 4; padding: 0.4rem; } h1 { color: #f1be32; font-size: min(5vw, 1.2em); } nav { width: 50%; max-width: 300px; height: 50px; } nav > ul { display: flex; justify-content: space-evenly; } h1, h2 { font-family: Verdana, Tahoma; } h2 { border-bottom: 4px solid #dfdfe2; } p::before { content: "Question #"; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } ```