fix(curriculum): add target in challeges link (#41876)

This commit is contained in:
Ritesh Arora
2021-04-22 10:04:23 +05:30
committed by GitHub
parent ec7224fb65
commit ec761dbdfa

View File

@ -13,7 +13,7 @@ You can nest links within other text elements.
```html
<p>
Here's a <a target="_blank" href="http://freecodecamp.org"> link to freecodecamp.org</a> for you to follow.
Here's a <a target="_blank" href="https://www.freecodecamp.org"> link to freecodecamp.org</a> for you to follow.
</p>
```
@ -32,18 +32,18 @@ Next is the *anchor* element `<a>` (which requires a closing tag `</a>`):
`target` is an anchor tag attribute that specifies where to open the link. The value `_blank` specifies to open the link in a new tab. The `href` is an anchor tag attribute that contains the URL address of the link:
```html
<a href="http://freecodecamp.org"> ... </a>
<a href="https://www.freecodecamp.org" target="_blank"> ... </a>
```
The text, `link to freecodecamp.org`, within the `a` element is called <dfn>anchor text</dfn>, and will display the link to click:
```html
<a href=" ... ">link to freecodecamp.org</a>
<a href=" ... " target="...">link to freecodecamp.org</a>
```
The final output of the example will look like this:
Here's a [link to freecodecamp.org](http://freecodecamp.org) for you to follow.
Here's a <a href="https://www.freecodecamp.org" target="_blank">link to freecodecamp.org</a> for you to follow.
# --instructions--
@ -59,11 +59,11 @@ assert(
);
```
The `a` element should link to "`https://freecatphotoapp.com`".
The `a` element should link to "`https://www.freecatphotoapp.com`".
```js
assert(
$('a[href="https://freecatphotoapp.com"]').length === 1
$('a[href="https://www.freecatphotoapp.com"]').length === 1
);
```
@ -87,7 +87,7 @@ Your `a` element should be nested within your new `p` element.
```js
assert(
$('a[href="https://freecatphotoapp.com"]').parent().is('p')
$('a[href="https://www.freecatphotoapp.com"]').parent().is('p')
);
```
@ -95,7 +95,7 @@ Your `p` element should have the text `View more ` (with a space after it).
```js
assert(
$('a[href="https://freecatphotoapp.com"]')
$('a[href="https://www.freecatphotoapp.com"]')
.parent()
.text()
.match(/View\smore\s/gi)
@ -140,7 +140,7 @@ assert(
<h2>CatPhotoApp</h2>
<main>
<a href="https://freecatphotoapp.com" target="_blank">cat photos</a>
<a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a>
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
@ -154,7 +154,7 @@ assert(
```html
<h2>CatPhotoApp</h2>
<main>
<p>View more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a></p>
<p>View more <a target="_blank" href="https://www.freecatphotoapp.com">cat photos</a></p>
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">