Learn CSS Grid by Building a Magazine - Step 7

Tell us what’s happening:
Describe your issue in detail here.
Your first new p element should have a class set to author-name .

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
<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%7CBaskervville%7CRaleway&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"></div>
<p class="author-name">By <a href ="https://freecodecamp.org" target="_blank">freeCodeCamp</p>
<p class="publish-date">March 7, 2019</p>
    </section>
  </main>
</body>
</html>
/* file: styles.css */

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.68

Challenge: Learn CSS Grid by Building a Magazine - Step 7

Link to the challenge:

Hello, do anchor elements need closing tags?

same error still while i put closing tags to anchor

Can you post the code to your latest attempt?

By freeCodeCamp

March 7, 2019

comment:
Your first new p element should have a class set to author-name .

Sorry, we couldnt see the code.

Can you enclose it with triple backticks like these?

```html

paste your code here

```

By freeCodeCamp

March 7, 2019

it doesn’t paste as a code , how can i showed it to you

Write

```html

before the code and
write

```

after the code

<div class="author"></div>
<p class="author-name">By <a href ="https://freecodecamp.org" target="_blank">freeCodeCamp</a></p>
<p class="publish-date">March 7, 2019</p>
      </section>
    </main>
1 Like

Hello @ahmed.monaim94

According to the question,

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 .

The p element that have the author-name class has to be inside the div element with author class.

The code you have provided, the p element is BELOW the div , not inside

You should be good after that.

done , thank you so much for your effort

2 Likes

This piece of code worked for me:

Mod edit: solution image redacted

I hope it helps…

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.