Tell us what’s happening:
this is my code so far and the other challenge is saying the hr tag should come between the title and paragraph, what do i do
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.
I recommend what @DanCouper just told you. Skip the challenge for now. There is already a 2 months old fix for this bug at the Github repo but, due to some issues, the server is still running an old version, so I’m sure it will be fixed soon.
If you want to see all the checkmarks in your curriculum just now and you have a clear understanding that the hack is just a hack and you should never do it in “real code”, I don’t think that’s so bad… Hehe
The problem is that it isn’t being made clear it’s invalid HTML and shouldn’t be used in real code. The vast majority of posts are not pointing that out, and I didn’t see anyone else pointing it out before I started doing so (though appreciate I haven’t read every post so may have missed some).
Yep, absolutely right. I understand people wanting to have all their curriculum checkmarked (I’m one of those) but I think understanding it’s just a hack and what is the hack for is a must.
I don’t particularly see anything wrong on using hacks to solve issues with tests. Actually I learnt a few things while reading code to solve some issues, but always understanding the way to do it right.
You cannot nest a block-level element (like a p tag) within an in-line element (like an em tag).
If you don’t want to take my word for it, the image shows a simple HTML page with a p tag nested within an em tag, which I’ve run through a HTML validator. You can check yourself at https://validator.w3.org if you want to. (Note there was a closing </html> tag at the end which you can’t see.)