--- id: bad87fee1348bd9aede08817 title: Nest an Anchor Element within a Paragraph challengeType: 0 videoUrl: '' localeTitle: Anidar un elemento de anclaje dentro de un párrafo --- ## Description
Puedes anidar enlaces dentro de otros elementos de texto.
<p>
Aquí hay un enlace <a target="_blank" href="http://freecodecamp.org"> a freecodecamp.org </a> para que lo siga.
</p>
Desglosemos el ejemplo: el texto normal está envuelto en el elemento p :
<p> Here's a ... for you to follow. </p> siguiente es el elemento de anchor <a> (el cual requiere una etiqueta de cierre </a> ):
<a> ... </a> target es un atributo de etiqueta de anclaje que especifica dónde abrir el enlace y el valor "_blank" especifica que se abra el enlace en una nueva pestaña
href es un atributo de etiqueta de anclaje que contiene la dirección URL de el enlace:
<a href="http://freecodecamp.org"> ... </a> El texto, "link to freecodecamp.org" , dentro del elemento de anchor text llamado anchor text , mostrará un enlace para hacer clic:
<a href=" ... ">link to freecodecamp.org</a> El resultado final del ejemplo se verá así:

Aquí hay un enlace a freecodecamp.org para que lo sigas.

## Instructions
Ahora anide de su actual elemento a dentro de un nuevo elemento p(justo a continuación del elemento main). El nuevo párrafo debe tener un texto que diga "Ver más fotos de gatos", donde "fotos de gatos" es un enlace, y el resto del texto es texto sin formato.
## Tests
```yml tests: - text: 'Es necesario un a elemento que une 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: Su a elemento debe tener el texto de anclaje de fotos "gato" testString: 'assert($("a").text().match(/cat\sphotos/gi), "Your a element should have the anchor text of "cat photos"");' - text: Crear un nuevo p elemento alrededor de su a elemento. Debe haber al menos 3 etiquetas p en total en su código 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: Su a elemento debe estar anidada dentro de su nueva p elemento. 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: Su elemento p debe tener el texto "Ver más" (con un espacio detrás de él). 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: Su a elemento no debería tener el texto "Ver más". testString: 'assert(!$("a").text().match(/View\smore/gi), "Your a element should not have the text "View more".");' - text: Asegúrese de que cada uno de sus elementos p tenga una etiqueta de cierre. testString: 'assert(code.match(/<\/p>/g) && code.match(/

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

p elements has a closing tag.");' - text: Asegúrese de que cada uno de sus a elementos tiene una etiqueta de cierre. 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 ```