Files
Shaun Hamilton 10f0d3c07a fix: new practice project tests (#44554)
* fix accessibility-quiz and reg-form tests

(cherry picked from commit 467f0b3e78)

* fix: registration-form tests

* fix: ferris wheel tests

* fix: photo-gallery tests

* fix: magazine tests

(cherry picked from commit 5831c2345d)

* fix: picasso tests

* fix: piano tests

* fix: magazine and nutrition tests

* fix: again magazine...I am doing this in sill order

* chore: resolve discrepancies with tests

(cherry picked from commit a7b5e031df)

* fix: the stuffs...I am tired

* fix: oops

(cherry picked from commit 05ff55a036)

* fix: add missing solutions

(cherry picked from commit 61fa23fc70)

Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
2021-12-22 08:16:59 -08:00

135 lines
4.0 KiB
Markdown

---
id: 614389f601bb4f611db98563
title: Step 9
challengeType: 0
dashedName: step-9
---
# --description--
Below your `.author` element, create a new `div` element with the class `social-icons`.
Add five `a` elements within that new `div`, and give them the following `href` attributes.
- The first `a` element should have an `href` set to `https://www.facebook.com/freecodecamp`.
- The second `a` element should have an `href` set to `https://twitter.com/freecodecamp`.
- The third `a` element should have an `href` set to `https://instagram.com/freecodecamp`.
- The fourth `a` element should have an `href` set to `https://www.linkedin.com/school/free-code-camp`.
- The fifth `a` element should have an `href` set to `https://www.youtube.com/freecodecamp`.
# --hints--
You should create a new `div` element.
```js
assert(document.querySelectorAll('div')?.length === 2);
```
Your new `div` element should come after your `.author` element.
```js
assert(document.querySelector('.author')?.nextElementSibling?.localName === 'div');
```
Your new `div` element should have the class `social-icons`.
```js
assert(document.querySelector('.author')?.nextElementSibling?.classList?.contains('social-icons'));
```
Your `.social-icons` element should have five `a` elements.
```js
assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.length === 5);
```
Your first `a` element should have an `href` set to `https://www.facebook.com/freecodecamp`.
```js
assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[0]?.getAttribute('href')?.includes('https://www.facebook.com/freecodecamp'));
```
Your second `a` element should have an `href` set to `https://twitter.com/freecodecamp`.
```js
assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[1]?.getAttribute('href'), 'https://twitter.com/freecodecamp');
```
Your third `a` element should have an `href` set to `https://instagram.com/freecodecamp`.
```js
assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[2]?.getAttribute('href'), 'https://instagram.com/freecodecamp');
```
Your fourth `a` element should have an `href` set to `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');
```
Your fifth `a` element should have an `href` set to `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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSS Grid Magazine</title>
<link
href="https://fonts.googleapis.com/css?family=Anton|Baskervville|Raleway&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<main>
<section class="heading">
<header class="hero">
<img
src="https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png"
alt="freecodecamp logo"
loading="lazy"
class="hero-img"
width="400"
/>
<h1 class="hero-title">OUR NEW CURRICULUM</h1>
<p class="hero-subtitle">
Our efforts to restructure our curriculum with a more project-based
focus
</p>
</header>
<div class="author">
<p class="author-name">
By
<a href="https://freecodecamp.org" target="_blank" rel="noreferrer"
>freeCodeCamp</a
>
</p>
<p class="publish-date">March 7, 2019</p>
</div>
--fcc-editable-region--
--fcc-editable-region--
</section>
</main>
</body>
</html>
```
```css
```