freeCodeCamp/curriculum/challenges/spanish/01-responsive-web-design/basic-html-and-html5/make-dead-links-using-the-h...

1.9 KiB

id title challengeType videoUrl localeTitle
bad87fee1348bd9aedf08817 Make Dead Links Using the Hash Symbol 0 Haz enlaces muertos usando el símbolo de hash

Description

A veces desea agregar a elementos a su sitio web antes de saber donde van a unir. Esto también es útil cuando está cambiando el comportamiento de un enlace usando JavaScript , que conoceremos más adelante.

Instructions

El valor actual del atributo href es un enlace que apunta a "http://freecatphotoapp.com". Reemplace el valor del atributo href con un # , también conocido como símbolo de hash, para crear un enlace muerto. Por ejemplo: href="#"

Tests

tests:
  - text: 'Su <code>a</code> elemento debe ser un vínculo roto con el valor de la <code>href</code> atributo establecido en &quot;#&quot;.'
    testString: 'assert($("a").attr("href") === "#", "Your <code>a</code> element should be a dead link with the value of the <code>href</code> attribute set to "#".");'

Challenge Seed

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="http://freecatphotoapp.com" target="_blank">cat photos</a>.</p>

  <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