You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfb6250eacea3f48c6300b2.md
+6-9Lines changed: 6 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -20,37 +20,34 @@ And its `alt` attribute value to:
20
20
There should be an `img` element right after the closing `</ul>` tag.
The new image does not have an `alt` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names.
The new image should have an `alt` value of `A slice of lasagna on a plate.` Make sure the `alt` attribute's value is surrounded with quotation marks.
33
33
34
34
```js
35
-
assert(
36
-
document.querySelectorAll('section')?.[1]
37
-
?.lastElementChild?.getAttribute('alt')
38
-
.replace(/\s+/g, '')
39
-
.match(/^A slice of lasagna on a plate\.?$/i)
35
+
assert.match(
36
+
document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.getAttribute('alt')?.replace(/\s+/g, ''),/^A slice of lasagna on a plate\.?$/i
40
37
);
41
38
```
42
39
43
40
The new image does not have a `src` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names.
The new image should have a `src` value of `https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg`. Make sure the `src` attribute's value is surrounded with quotation marks.
The new image does not have an `alt` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names.
The new image should have an `alt` value of `A slice of lasagna on a plate.` Make sure the `alt` attribute's value is surrounded with quotation marks.
33
33
34
34
```js
35
35
assert.match(
36
-
document.querySelectorAll('section')[1]
37
-
.lastElementChild.getAttribute('alt')
38
-
.replace(/\s+/g, ''),/^A slice of lasagna on a plate\.?$/i
36
+
document.querySelectorAll('section')[1].querySelector('ul').nextElementSibling?.getAttribute('alt')?.replace(/\s+/g, ''),/^A slice of lasagna on a plate\.?$/i
39
37
);
40
38
```
41
39
42
40
The new image does not have a `src` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names.
The new image should have a `src` value of `https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg`. Make sure the `src` attribute's value is surrounded with quotation marks.
0 commit comments