--- id: 614389f601bb4f611db98563 title: Step 9 challengeType: 0 dashedName: step-9 --- # --description-- Sotto l'elemento `.author`, crea un nuovo elemento `div` con la classe `social-icons`. Aggiungi cinque elementi `a` all'interno del nuovo `div` e assegna loro i seguenti attributi `href`. - Il primo elemento `a` dovrebbe avere un `href` impostato su `https://www.facebook.com/freecodecamp`. - Il secondo elemento `a` dovrebbe avere un `href` impostato su `https://twitter.com/freecodecamp`. - Il terzo elemento `a` dovrebbe avere un `href` impostato su `https://instagram.com/freecodecamp`. - Il quarto elemento `a` dovrebbe avere un `href` impostato su `https://www.linkedin.com/school/free-code-camp`. - Il quinto elemento `a` dovrebbe avere un `href` impostato su `https://www.youtube.com/freecodecamp`. # --hints-- Dovresti creare un nuovo elemento `div`. ```js assert(document.querySelectorAll('div')?.length === 2); ``` Il nuovo elemento `div` dovrebbe trovarsi dopo l'elemento `.author`. ```js assert(document.querySelector('.author')?.nextElementSibling?.localName === 'div'); ``` Il nuovo elemento `div` dovrebbe avere la classe `social-icons`. ```js assert(document.querySelector('.author')?.nextElementSibling?.classList?.contains('social-icons')); ``` L'elemento `.social-icons` dovrebbe avere cinque elementi `a`. ```js assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.length === 5); ``` Il primo elemento `a` dovrebbe avere un attributo `href` impostato su `https://www.facebook.com/freecodecamp`. ```js assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[0]?.getAttribute('href')?.includes('https://www.facebook.com/freecodecamp')); ``` Il secondo elemento `a` dovrebbe avere un `href` impostato su `https://twitter.com/freecodecamp`. ```js assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[1]?.getAttribute('href'), 'https://twitter.com/freecodecamp'); ``` Il terzo elemento `a` dovrebbe avere un `href` impostato su `https://instagram.com/freecodecamp`. ```js assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[2]?.getAttribute('href'), 'https://instagram.com/freecodecamp'); ``` Il quarto elemento `a` dovrebbe avere un `href` impostato su `https://www.linkedin.com/school/free-code-camp`. ```js assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[3]?.getAttribute('href'), 'https://www.linkedin.com/school/free-code-camp'); ``` Il quinto elemento `a` dovrebbe avere un `href` impostato su `https://www.youtube.com/freecodecamp`. ```js assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[4]?.getAttribute('href'), 'https://www.youtube.com/freecodecamp'); ``` # --seed-- ## --seed-contents-- ```html Magazine
freecodecamp logo

OUR NEW CURRICULUM

Our efforts to restructure our curriculum with a more project-based focus

By freeCodeCamp

March 7, 2019

--fcc-editable-region-- --fcc-editable-region--
``` ```css ```