Createing a Horizontal Line Using hr Element

Tell us what’s happening:

It says that the horizontal line should come between the title and the paragraph which it is doing but they are giving a error why???

Your code so far


<style>
  h4 {
    text-align: center;
    height: 25px;
  }
  p {
    text-align: justify;
  }
  .links {
    text-align: left;
    color: black;
  }
  .fullCard {
    width: 245px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }
  .cardContent {
    padding: 10px;
  }
  .cardText {
    margin-bottom: 30px;
  }
</style>
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <h4><s>Google</s>Alphabet</h4>
      <hr>
      <p><em>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</em></p>
    </div>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
    </div>
  </div>
</div>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/create-a-horizontal-line-using-the-hr-element

1 Like

This is a known bug.

I would skip this challenge and comeback later.

1 Like

how do you skip?

the challenge.

Hit curriculum tab on the top right page and navigate to where you are :slight_smile:

just switch p and em then put hr the code will be fine :wink:

now the code will be

“<em <p Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University. </p </em”

i didn’t put > on html tags for the purpose of demonstration, you have to put them in order to work

i hope it will help. this solution work fine for me

3 Likes

Thank you so much
it works

That code is not “fine”. It is invalid HTML. It may pass the test in here but if you run it through a legitimate HTML validator such as the one on https://validator.w3.org it will fail.

Thanks, this resolved the issue for me.

It’s a bug here on FCC. They should really work on fixing it.

They are working on fixing it. They’re currently reviewing the batch of fixes they’re going to release now.

1 Like

Is this code is working or not …because in my case this code is not working ,that’s why i am ask you plzzz help…

Change this line:

<p><em>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</em></p>

To this:

<em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>

It’s a bug on FCC but you should pass the challenge with that small edit.

The challenge has now been fixed and you can use the correct answer now. :slight_smile: