--- id: 615f8bfe0f30a1a3c340356b title: Step 62 challengeType: 0 dashedName: step-62 --- # --description-- Create another `p` element, give it the text `Calcium 260mg 20%`. Align `20%` to the right. Below that, create a `p` element with the text `Iron 8mg 45%`, aligning the `45%` to the right. # --hints-- You should create two new `p` elements at the end of your `.daily-value.sm-text` element. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` Your first new `p` element should have the text `Calcium 260mg 20%`. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` Your first new `p` element should have a `span` element. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` Your first `span` element should have the `class` attribute set to `right`. Remember, do not make it bold. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` Your first `span` element should wrap the text `20%`. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` Your second new `p` element should have the text `Iron 8mg 45%`. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` Your second new `p` element should have a `span` element. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` Your second `span` element should have the `class` attribute set to `right`. Remember, do not make it bold. ```js assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- ## --seed-contents-- ```html Nutrition Label

Nutrition Facts

8 servings per container

Serving size 2/3 cup (55g)

Amount per serving

Calories 230

--fcc-editable-region--

% Daily Value *

Total Fat 8g10%

Saturated Fat 1g 5%

Trans Fat 0g

Cholesterol 0mg 0%

Sodium 160mg 7%

Total Carbohydrate 37g 13%

Dietary Fiber 4g

Total Sugars 12g

Includes 10g Added Sugars 20%

Protein 3g

Vitamin D 2mcg 10%

--fcc-editable-region--
``` ```css * { box-sizing: border-box; } html { font-size: 16px; } body { font-family: 'Open Sans', sans-serif; } .label { border: 2px solid black; width: 270px; margin: 20px auto; padding: 0 7px; } header h1 { text-align: center; margin: -4px 0; letter-spacing: 0.15px } p { margin: 0; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; clear: right; } .bold { font-weight: 800; } .right { float: right; } .lg { height: 10px; } .lg, .md { background-color: black; border: 0; } .md { height: 5px; } .sm-text { font-size: 0.85rem; } .calories-info h1 { margin: -5px -2px; overflow: hidden; } .calories-info span { font-size: 1.2em; margin-top: -7px; } .indent { margin-left: 1em; } .dbl-indent { margin-left: 2em; } .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; } ```