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

1.4 KiB

id title challengeType dashedName
5dc174fcf86c76b9248c6eb2 Paso 1 0 step-1

--description--

Los elemento HTML tienen etiquetas de apertura, como <h1> y etiquetas de cierre, como </h1>.

Encuentra el elemento h1 y cambia su texto a:

CatPhotoApp

Asegúrate de que el texto esté entre las etiquetas de apertura y cierre.

--hints--

El texto CatPhotoApp debe estar presente en el código. Talvez deberías revisar tu ortografía.

assert(code.match(/catphotoapp/i));

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

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

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

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

Tienes más de un elemento h1. Elimina el elemento h1 extra.

assert(document.querySelectorAll('h1').length === 1);

El texto de tu elemento h1 deber ser CatPhotoApp. Probablemente olvidaste añadir el texto, tienes un error tipográfico o no está entre las etiquetas de apertura y cierre del elemento h1.

assert(document.querySelector('h1').innerText.toLowerCase() === 'catphotoapp');

--seed--

--seed-contents--

<html>
  <body>
--fcc-editable-region--
    <h1>Hello World</h1>
--fcc-editable-region--
  </body>
</html>