* chore(curriculum): accessibility-quiz * chore(curriculum): cafe-menu * chore(curriculum): ferris-wheel * chore(curriculum): fix ferris-wheel tests * chore(curriculum): colored-markers * chore(curriculum): photo-gallery * chore(curriculum): magazine * chore(curriculum): penguin * chore(curriculum): city-skyline * chore(curriculum): registration-form * chore(curriculum): picasso-painting * chore(curriculum): balance-sheet * chore(curriculum): piano * chore(curriculum): rothko-painting * fix: title min 15 chars
4.0 KiB
id, title, challengeType, dashedName
id | title | challengeType | dashedName |
---|---|---|---|
614389f601bb4f611db98563 | Step 9 | 0 | 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 anhref
set tohttps://www.facebook.com/freecodecamp
. - The second
a
element should have anhref
set tohttps://twitter.com/freecodecamp
. - The third
a
element should have anhref
set tohttps://instagram.com/freecodecamp
. - The fourth
a
element should have anhref
set tohttps://www.linkedin.com/school/free-code-camp
. - The fifth
a
element should have anhref
set tohttps://www.youtube.com/freecodecamp
.
--hints--
You should create a new div
element.
assert(document.querySelectorAll('div')?.length === 2);
Your new div
element should come after your .author
element.
assert(document.querySelector('.author')?.nextElementSibling?.localName === 'div');
Your new div
element should have the class social-icons
.
assert(document.querySelector('.author')?.nextElementSibling?.classList?.contains('social-icons'));
Your .social-icons
element should have five a
elements.
assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.length === 5);
Your first a
element should have an href
set to https://www.facebook.com/freecodecamp
.
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
.
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
.
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
.
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
.
assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[4]?.getAttribute('href'), 'https://www.youtube.com/freecodecamp');
--seed--
--seed-contents--
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>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>