Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion HTML Forms HTML Mastery

Stage 7 - Forms

INSTRUCTION:

Challenge task 4 of 8

Add a paragraph tag that has some text inside of it bolded.

MY CODE: <html> <head> <title>HTML Mastery Challenge</title> </head> <body> <h1>HTML Mastery Challenge</h1>

<!-- Write your code below -->
<div>
  <h2>Shopping List</h2>
  <ol>
    <li>Bread</li>
    <li>Milk</li>
    <li>Butter</li>
  </ol>
</div>
<p>This is <b>shopping!</b></p>

</body> </html> RESULT:

Bummer! Remember, being bold is a strong thing to do.

QUESTION:

What am I doing wrong here?

5 Answers

The Treehouse team left you a hint in the results. "... bold is a strong thing to do." The code challenge is looking for the use of the <strong> tag. Swap out the <b> tag for <strong> and you code should pass the challange.

Thanks for the reply Ryan but I don't quite understand your answer. Could you clarify please?

I also tried:

<html> <head> <title>HTML Mastery Challenge</title> </head> <body> <h1>HTML Mastery Challenge</h1>

<!-- Write your code below -->
<div>
  <h2>Shopping List</h2>
  <ol>
    <li>Bread</li>
    <li>Milk</li>
    <li>Butter</li>
  </ol>
</div>
<strong>This is shopping!</strong>

</body> </html>

But that doesn't work either.

I'll try to explain as best I can. Although both the <b> and <strong> will, in most cases, provide the same presentation they have a very different semantic meanings. <b> is a style and everyone knows what bold is supposed to look like. <strong> however is an indication weight or importance. Strong often does mean bold, but it could also mean a higher level of importance to a search engine or a screen reader for the visually impaired.

So when you're writing your HTML make sure the use the tag that works best for your situation. In this case, even thought your code would produce the desired visual results, the code challenge was looking for the <strong> tag.

<!-- Write your code below -->
<div>
  <h2>Shopping List</h2>
  <ol>
    <li>Bread</li>
    <li>Milk</li>
    <li>Butter</li>
  </ol>
</div>
<p>This is <strong>shopping!</strong></p>

Excellent Ryan, thanks for the help and explanation.