Create a hr Element

Create a hr Element
0

#1

Tell us what’s happening:
I am in “Applied Visual Design”, lesson 7 “Create a Horizontal Line Using the hr Element” I created the hr element but I keep getting the message, “The hr tag should come between the title and the paragraph.”

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

Nevermind guys, I figured it out.


#3

Could you show it here how you figured that out? I am still stuck and I thought that was a bug so it is not doable.


#4

If you want to solve that bug

You have to do only this

SWAP the p tag with em tag

Bring the em tag in front of p tag


#5

Sorry I don’t understand.
The result is correct but I still get an error message:

</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>```

#6

Hey @emika1777,
Challenge has a bug.
Your code ia correct so skip this challenge and move on.


#7

can confirm bug is still present and @anonymous1 suggestion works


#8

Thanks Patel
It worked. Nice hack!!


#9

@emika1777 you have to SWAP the position of em tag with p tag
In the code shown below i have brought the em tag in front of p tag
Copy paste the below code


#10

By swapping p tag with em tag it means you don’t need to use the p tag at all. Put the em tag in place of p tag.
Good luck!


#11

Yes you are right
But it works both the ways
BTW i don’t know why FCC devs are not solving this problem