--- id: bad87fee1348bd9aedf08816 title: Link to External Pages with Anchor Elements challengeType: 0 videoUrl: '' localeTitle: ربط الصفحات الخارجية بستخدام عناصر المرساة Anchor --- ## Description
يمكنك استخدام العنصر anchor للربط بمحتوى خارج صفحة الويب الخاصة بك. يحتاج العنصر anchor إلى عنوان ويب يسمى بالسمة href. هذه السمة تحتاج نص للرابط. في ما يلي مثال: <a href="https://freecodecamp.org">روابط إلى freecodecamp.org</a> ثم يعرض المتصفح النص "روابط إلى freecodecamp.org" كرابط يمكنك النقر عليها. وسيأخذك هذا الرابط إلى عنوان الويب https://www.freecodecamp.org.
## Instructions
إنشاء العنصر a الذي يربط http://freecatphotoapp.com له النص "cat photos"، في نص الرابط .
## Tests
```yml tests: - text: يجب أن يحتوي العنصر a الخاص بك على "cat photos" كنص للرابط anchor text . testString: 'assert((/cat photos/gi).test($("a").text()), "Your a element should have the anchor text of "cat photos".");' - text: 'تحتاج إلى عنصر a يربط بالعنوان http://freecatphotoapp.com' testString: 'assert(/http:\/\/(www\.)?freecatphotoapp\.com/gi.test($("a").attr("href")), "You need an a element that links to http://freecatphotoapp.com");' - text: تأكد من ان العنصر a يحتوي على وسم إغلاق. testString: 'assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/a element has a closing tag.");' ```
## Challenge Seed
```html

CatPhotoApp

A cute orange cat lying on its back.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

```
## Solution
```js // solution required ```