fix(curriculum): add target in challeges link (#41876)
This commit is contained in:
@ -13,7 +13,7 @@ You can nest links within other text elements.
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<p>
|
<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>
|
</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:
|
`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
|
```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:
|
The text, `link to freecodecamp.org`, within the `a` element is called <dfn>anchor text</dfn>, and will display the link to click:
|
||||||
|
|
||||||
```html
|
```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:
|
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--
|
# --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
|
```js
|
||||||
assert(
|
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
|
```js
|
||||||
assert(
|
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
|
```js
|
||||||
assert(
|
assert(
|
||||||
$('a[href="https://freecatphotoapp.com"]')
|
$('a[href="https://www.freecatphotoapp.com"]')
|
||||||
.parent()
|
.parent()
|
||||||
.text()
|
.text()
|
||||||
.match(/View\smore\s/gi)
|
.match(/View\smore\s/gi)
|
||||||
@ -140,7 +140,7 @@ assert(
|
|||||||
<h2>CatPhotoApp</h2>
|
<h2>CatPhotoApp</h2>
|
||||||
<main>
|
<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.">
|
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ assert(
|
|||||||
```html
|
```html
|
||||||
<h2>CatPhotoApp</h2>
|
<h2>CatPhotoApp</h2>
|
||||||
<main>
|
<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.">
|
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user