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 trialKeith Kerswell
1,097 PointsStage 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
Ryan Stratton
19,181 PointsThe 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.
Keith Kerswell
1,097 PointsThanks for the reply Ryan but I don't quite understand your answer. Could you clarify please?
Keith Kerswell
1,097 PointsI 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.
Ryan Stratton
19,181 PointsI'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>
Keith Kerswell
1,097 PointsExcellent Ryan, thanks for the help and explanation.