Createing a Horizontal Line Using hr Element

Createing a Horizontal Line Using hr Element
0

#1

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


#2

This is a known bug.

I would skip this challenge and comeback later.


#3

how do you skip?

the challenge.


#4

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


#5

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


#6

Thank you so much
it works


#7

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.