--- id: bad87fee1348bd9aedf08845 title: Use a span to Target Inline Elements challengeType: 0 videoUrl: '' localeTitle: Use un lapso para apuntar elementos en línea --- ## Description
Puede utilizar spans para crear elementos en línea. ¿Recuerdas cuando usamos la clase btn-block para hacer que el botón llene toda la fila? ```html ``` Esto ilustra la diferencia entre un elemento "inline" y un elemento "block". Al utilizar el elemento de span inline, puede colocar varios elementos en la misma línea, e incluso diseñar diferentes partes de la misma línea de manera diferente. Anida la palabra "love" en el elemento "Things cats love" dentro de un elemento span. Luego, asigna al span la clase text-danger para hacer que el texto sea rojo. A continuación le indicamos cómo haría esto con el elemento "Top 3 things cats hate": <p>Top 3 things cats <span class="text-danger">hate:</span></p>
## Instructions
## Tests
```yml tests: - text: Su elemento span debe estar dentro de su elemento p . testString: 'assert($("p span") && $("p span").length > 0, "Your span element should be inside your p element.");' - text: Tu elemento span debe tener solo el texto love . testString: 'assert($("p span") && $("p span").text().match(/love/i) && !$("p span").text().match(/Things cats/i), "Your span element should have just the text love.");' - text: Su elemento span debe tener clase de text-danger . testString: 'assert($("span").hasClass("text-danger"), "Your span element should have class text-danger.");' - text: Asegúrese de que su elemento span tenga una etiqueta de cierre. testString: 'assert(code.match(/<\/span>/g) && code.match(//g).length === code.match(/span element has a closing tag.");' ```
## Challenge Seed
```html

CatPhotoApp

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```