freeCodeCamp/curriculum/challenges/espanol/14-responsive-web-design-22/learn-html-by-building-a-ca.../5ddbd81294d8ddc1510a8e56.md

1.6 KiB

id title challengeType dashedName
5ddbd81294d8ddc1510a8e56 Paso 11 0 step-11

--description--

El texto de un enlace debe colocarse entre la etiqueta de apertura y la etiqueta de cierre de un elemento anchor (a). Por ejemplo, <a href="https://www.freecodecamp.org">click here to go to freeCodeCamp.org</a> es un enlace con el texto click here to go to freeCodeCamp.org.

Añade el texto cat photos al elemento anchor. Esto se convertirá en el texto del enlace.

--hints--

Tu elemento (a) debe tener una etiqueta de apertura. Las etiquetas de apertura tienen esta sintaxis: <elementName>.

assert(document.querySelector('a'));

Tu elemento anchor (a) debe tener una etiqueta de cierre. Las etiquetas de cierre tiene una / después del carácter <.

assert(code.match(/<\/a\>/));

El texto de tu elemento anchor (a) debería ser cat photos. Asegúrate de poner el texto del enlace entre la etiqueta de apertura y etiqueta de cierre del elemento (a).

assert(
  document.querySelector('a').innerText.toLowerCase().replace(/\s+/g, ' ') ===
    'cat photos'
);

--seed--

--seed-contents--

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more cat photos.</p>
--fcc-editable-region--
      <a href="https://freecatphotoapp.com"></a>
--fcc-editable-region--
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>