Files
freeCodeCamp/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.arabic.md
2020-07-15 15:23:16 +05:30

2.7 KiB

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
bad87fee1348bd9aedf08816 Link to External Pages with Anchor Elements 0 ربط الصفحات الخارجية بستخدام عناصر المرساة Anchor

Description

يمكنك استخدام العنصر anchor للربط بمحتوى خارج صفحة الويب الخاصة بك. يحتاج العنصر anchor إلى عنوان ويب يسمى بالسمة href. هذه السمة تحتاج نص للرابط. في ما يلي مثال: <a href="https://freecodecamp.org">روابط إلى freecodecamp.org</a> ثم يعرض المتصفح النص "روابط إلى freecodecamp.org" كرابط يمكنك النقر عليها. وسيأخذك هذا الرابط إلى عنوان الويب https://www.freecodecamp.org.

Instructions

إنشاء العنصر a الذي يربط https://freecatphotoapp.com له النص "cat photos"، في نص الرابط .

Tests

tests:
  - text: يجب أن يحتوي العنصر <code>a</code> الخاص بك على &quot;cat photos&quot; كنص للرابط <code>anchor text </code>.  
    testString: 'assert((/cat photos/gi).test($("a").text()), "Your <code>a</code> element should have the <code>anchor text</code> of "cat photos".");'
  - text: 'تحتاج إلى عنصر <code>a</code> يربط بالعنوان <code>https://freecatphotoapp.com</code>'
    testString: 'assert(/http:\/\/(www\.)?freecatphotoapp\.com/gi.test($("a").attr("href")), "You need an <code>a</code> element that links to <code>http&#58;//freecatphotoapp<wbr>.com</code>");'
  - text: تأكد من ان العنصر <code>a</code> يحتوي على وسم إغلاق.
    testString: 'assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/<a/g).length, "Make sure your <code>a</code> element has a closing tag.");'

Challenge Seed

<h2>CatPhotoApp</h2>
<main>



  <img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

  <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

Solution

// solution required