--- id: 614387cbefeeba5f3654a291 title: Step 7 challengeType: 0 dashedName: step-7 --- # --description-- After your `header` element, create a `div` with the `class` set to `author`. Within that `div`, create a `p` element with the `class` set to `author-name` and give it the text `By freeCodeCamp`. Wrap the `freeCodeCamp` portion in an `a` element with the `href` set to `https://freecodecamp.org`, and the `target` set to `_blank`. Below that, add a second `p` element with the class `publish-date` and the text `March 7, 2019`. # --hints-- You should create a new `div` element. ```js assert.exists(document.querySelector('div')); ``` Your `div` element should come after your `header` element. ```js assert(document.querySelector('div')?.previousElementSibling?.localName === 'header'); ``` Your `div` element should have the `class` set to `author`. ```js assert(document.querySelector('div')?.className === 'author'); ``` You should create two new `p` elements. ```js assert(document.querySelectorAll('p')?.length === 3); ``` Your two new `p` elements should be within your `div` element. ```js assert.exists(document.querySelector('div')?.querySelectorAll('p')?.length === 2); ``` Your first new `p` element should have a `class` set to `author-name`. ```js assert(document.querySelector('div')?.querySelector('p')?.className === 'author-name'); ``` Your first new `p` element should have the text `By freeCodeCamp`. ```js assert(document.querySelector('div')?.querySelector('p')?.innerText === 'By freeCodeCamp'); ``` Your second new `p` element should have a `class` set to `publish-date`. ```js assert(document.querySelector('div')?.querySelectorAll('p')?.[1]?.className === 'publish-date'); ``` Your second new `p` element should have the text `March 7, 2019`. ```js assert(document.querySelector('div')?.querySelectorAll('p')?.[1]?.innerText === 'March 7, 2019'); ``` You should create a new `a` element. ```js assert.exists(document.querySelector('a')); ``` Your `a` element should be within your first new `p` element. ```js assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.localName === 'a'); ``` Your `a` element should have the `href` set to `https://freecodecamp.org`. ```js assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.getAttribute('href') === 'https://freecodecamp.org'); ``` Your `a` element should have the `target` set to `_blank`. ```js assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.getAttribute('target') === '_blank'); ``` Your `a` element should surround the text `freeCodeCamp`. ```js assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.textContent === 'freeCodeCamp'); ``` # --seed-- ## --seed-contents-- ```html Magazine
freecodecamp logo

OUR NEW CURRICULUM

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

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