From c198d508be2515ba2db14c2e7e852e758bbe6e34 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Fri, 12 Mar 2021 10:09:22 -0700 Subject: [PATCH] fix(learn): Improve tests for the Nest an Anchor Element within a Paragraph challenge (#41456) --- .../nest-an-anchor-element-within-a-paragraph.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.md index 1235d2d719..7ff58f71e7 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph.md @@ -43,11 +43,19 @@ Nest the existing `a` element within a new `p` element. The new paragraph should # --hints-- -You should have an `a` element that links to "`https://freecatphotoapp.com`". +You should only have one `a` element. ```js assert( - $('a[href="https://freecatphotoapp.com"]').length > 0 + $('a').length === 1 +); +``` + +The `a` element should link to "`https://freecatphotoapp.com`". + +```js +assert( + $('a[href="https://freecatphotoapp.com"]').length === 1 ); ``` @@ -61,7 +69,7 @@ assert( ); ``` -You should create a new `p` element around your `a` element. There should be at least 3 total `p` tags in your HTML code. +You should create a new `p` element. There should be at least 3 total `p` tags in your HTML code. ```js assert($('p') && $('p').length > 2);