--- id: bad87fee1348bd9aede08817 title: Nest an Anchor Element within a Paragraph challengeType: 0 videoUrl: '' localeTitle: عش عنصر الارتساء ضمن فقرة --- ## Description
يمكنك تضمين الروابط داخل عناصر نصية أخرى.
<P>
إليك <a target="_blank" href="http://freecodecamp.org"> رابط إلى freecodecamp.org </a> لتتبعه.
</ P>
دعونا نقسم المثال: يتم التفاف النص العادي في عنصر p :
<p> Here's a ... for you to follow. </p> التالي هو عنصر anchor <a> (الذي يتطلب علامة إغلاق </a> ):
<a> ... </a> target عبارة عن سمة علامة ارتساء تحدد مكان فتح الرابط "_blank" القيمة "_blank" لفتح الرابط في علامة تبويب جديدة href عبارة عن سمة علامة ارتساء تحتوي على عنوان URL لـ الرابط:
<a href="http://freecodecamp.org"> ... </a> سيعرض النص "link to freecodecamp.org" ، داخل عنصر anchor text يدعى anchor text الرابط ، رابطًا للنقر:
<a href=" ... ">link to freecodecamp.org</a> الناتج النهائي للمثال كما يلي:

إليك رابط لـ freecodecamp.org لتتبعه .

## Instructions
الآن عش الموجودة لديك a عنصر داخل الجديد p عنصر (فقط بعد القائمة main عنصر). يجب أن تحتوي الفقرة الجديدة على نص يقول "عرض المزيد من صور القط" ، حيث تكون "صور القط" ارتباطًا ، وبقية النص عبارة عن نص عادي.
## Tests
```yml tests: - text: 'تحتاج إلى a العنصر الذي يربط "http://freecatphotoapp.com".' testString: 'assert(($("a[href=\"http://freecatphotoapp.com\"]").length > 0 || $("a[href=\"http://www.freecatphotoapp.com\"]").length > 0), "You need an a element that links to "http://freecatphotoapp.com".");' - text: الخاص بك a يجب أن يكون عنصر النص مرساة "صور القط" testString: 'assert($("a").text().match(/cat\sphotos/gi), "Your a element should have the anchor text of "cat photos"");' - text: إنشاء جديد p العنصر حول الخاص a العنصر. يجب أن يكون هناك 3 علامات p على الأقل في كود HTML الخاص بك. testString: 'assert($("p") && $("p").length > 2, "Create a new p element around your a element. There should be at least 3 total p tags in your HTML code.");' - text: '' testString: 'assert(($("a[href=\"http://freecatphotoapp.com\"]").parent().is("p") || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().is("p")), "Your a element should be nested within your new p element.");' - text: يجب أن يحتوي عنصر p على النص "عرض المزيد" (مع وجود مسافة بعده). testString: 'assert(($("a[href=\"http://freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi) || $("a[href=\"http://www.freecatphotoapp.com\"]").parent().text().match(/View\smore\s/gi)), "Your p element should have the text "View more " (with a space after it).");' - text: الخاص بك a يجب أن لا يكون عنصر النص "عرض أكثر". testString: 'assert(!$("a").text().match(/View\smore/gi), "Your a element should not have the text "View more".");' - text: تأكد من أن كل عنصر من عناصر p لديه علامة إغلاق. testString: 'assert(code.match(/<\/p>/g) && code.match(/

/g).length === code.match(/

p elements has a closing tag.");' - text: تأكد من أن كل a عناصرك لديه علامة إغلاق. testString: 'assert(code.match(/<\/a>/g) && code.match(//g).length === code.match(/a elements has a closing tag.");' ```

## Challenge Seed
```html

CatPhotoApp

cat photos 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 ```