Skip to content

Commit c198d50

Browse files
fix(learn): Improve tests for the Nest an Anchor Element within a Paragraph challenge (freeCodeCamp#41456)
1 parent d74a6ec commit c198d50

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,19 @@ Nest the existing `a` element within a new `p` element. The new paragraph should
4343

4444
# --hints--
4545

46-
You should have an `a` element that links to "`https://freecatphotoapp.com`".
46+
You should only have one `a` element.
4747

4848
```js
4949
assert(
50-
$('a[href="https://freecatphotoapp.com"]').length > 0
50+
$('a').length === 1
51+
);
52+
```
53+
54+
The `a` element should link to "`https://freecatphotoapp.com`".
55+
56+
```js
57+
assert(
58+
$('a[href="https://freecatphotoapp.com"]').length === 1
5159
);
5260
```
5361

@@ -61,7 +69,7 @@ assert(
6169
);
6270
```
6371

64-
You should create a new `p` element around your `a` element. There should be at least 3 total `p` tags in your HTML code.
72+
You should create a new `p` element. There should be at least 3 total `p` tags in your HTML code.
6573

6674
```js
6775
assert($('p') && $('p').length > 2);

0 commit comments

Comments
 (0)