---
id: bad87fee1348bd9aede08835
title: Nidificare diversi elementi all'interno di un singolo elemento div
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVMPUv/cNW4kC3'
forumTopicId: 18246
dashedName: nest-many-elements-within-a-single-div-element
---
# --description--
L'elemento `div`, noto anche come elemento di divisione, è un contenitore di uso generale per altri elementi.
L'elemento `div` è probabilmente l'elemento HTML usato più comunemente.
Proprio come qualsiasi altro elemento puoi aprire un elemento `div` con `
` e chiuderlo su un'altra linea con `
`.
# --instructions--
Nidifica le tue liste "Things cats love" e "Top 3 things cats hate" all'interno di un singolo elemento `div`.
Suggerimento: Prova a mettere il tuo tag `div` di apertura sopra l'elemento `p` "Things cats love" e il tag `div` di chiusura dopo il tag `ol` in modo che entrambe le liste siano all'interno di un `div`.
# --hints--
I tuoi elementi `p` dovrebbero essere annidati all'interno dell'elemento `div`.
```js
assert($('div').children('p').length > 1);
```
Il tuo elemento `ul` dovrebbe essere annidato all'interno dell'elemento `div`.
```js
assert($('div').children('ul').length > 0);
```
Il tuo elemento `ol` dovrebbe essere annidato all'interno dell'elemento `div`.
```js
assert($('div').children('ol').length > 0);
```
Il tuo elemento `div` dovrebbe avere un tag di chiusura.
```js
assert(
code.match(/<\/div>/g) &&
code.match(/<\/div>/g).length === code.match(//g).length
);
```
# --seed--
## --seed-contents--
```html
CatPhotoApp
Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
```
# --solutions--
```html
CatPhotoApp
Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
```