--- id: 615f671b6d1919792745aa5d title: Step 39 challengeType: 0 dashedName: step-39 --- # --description-- Crea un nuovo elemento `div` sotto l'elemento `.md`. Assegnagli un attributo `class` impostato su `daily-value sm-text`. All'interno di questo nuovo `div`, crea un elemento `p` con il testo `% Daily Value *` e imposta l'attributo `class` con il valore `right bold`. # --hints-- Dovresti creare un nuovo elemento `div` dopo l'elemento `.md`. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); ``` Il nuovo `div` dovrebbe avere un attributo `class` con il valore `daily-value sm-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); ``` Il nuovo elemento `div` dovrebbe avere un elemento `p`. ```js assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `% Daily Value *`. ```js assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` Il nuovo elemento `p` dovrebbe avere un attributo `class` con il valore `right bold`. ```js assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- ## --seed-contents-- ```html
8 servings per container
Serving size 2/3 cup (55g)
Amount per serving