📖 Scenario: You are creating a simple webpage to show the difference between two HTML tags that make text bold: and .These tags look similar but have different meanings. means the text is important, while just makes text bold without extra meaning.
🎯 Goal: Build a small HTML page that uses both and tags to highlight text. This will help you see how to use them correctly in real webpages.
📋 What You'll Learn
Create a basic HTML5 page structure with , , and tags
Add a heading inside that says exactly: "Strong vs b tag example"
Add a paragraph that uses the tag around the word "important"
Add another paragraph that uses the tag around the word "bold"
Use semantic HTML and include the lang attribute in and charset meta tag
💡 Why This Matters
🌍 Real World
Webpages often need to highlight important words for screen readers and SEO. Using <strong> helps convey meaning, while <b> is for styling.
💼 Career
Understanding semantic HTML tags like <strong> and <b> is essential for creating accessible and well-structured websites.
Progress0 / 4 steps
1
Create the basic HTML5 page structure
Create a basic HTML5 page with html, head, and body tags. Set the lang attribute of html to "en". Inside head, add a meta tag with charset set to "UTF-8".
HTML
Hint
Remember to start with <!DOCTYPE html> and set lang="en" on the html tag.
2
Add a heading inside the body
Inside the body tag, add a heading level 1 (h1) with the exact text: "Strong vs b tag example".
HTML
Hint
Use the <h1> tag for the main heading inside the body.
3
Add a paragraph with the <strong> tag
Add a paragraph (p) inside body that contains the sentence: "This word is important in the sentence." Use the strong tag exactly around the word "important".
HTML
Hint
Wrap only the word "important" with the <strong> tag inside the paragraph.
4
Add a paragraph with the <b> tag
Add another paragraph (p) inside body that contains the sentence: "This word is bold but not important." Use the b tag exactly around the word "bold".
HTML
Hint
Wrap only the word "bold" with the <b> tag inside the paragraph.
Practice
(1/5)
1. What is the main difference between the <strong> and <b> tags in HTML?
easy
A. <strong> indicates important text, <b> only styles text bold.
B. <b> indicates important text, <strong> only styles text bold.
C. Both tags have the same meaning and usage.
D. <strong> makes text italic, <b> makes text bold.
Solution
Step 1: Understand semantic meaning of tags
<strong> is used to mark text as important or urgent, giving it semantic meaning for browsers and assistive technologies.
Step 2: Understand visual styling difference
<b> only makes text bold visually without adding importance or meaning.
Final Answer:
<strong> indicates important text, <b> only styles text bold. -> Option A
Quick Check:
Semantic meaning = <strong> [OK]
Hint: Use <strong> for importance, <b> for just bold style [OK]
Common Mistakes:
Thinking both tags mean the same
Using <b> for important text
Confusing <strong> with italic tags
2. Which of the following is the correct syntax to make the word "Warning" bold and indicate it is important?
easy
A. <b>Warning</b>
B. <strong>Warning</strong>
C. <i>Warning</i>
D. <em>Warning</em>
Solution
Step 1: Identify tag for importance and bold
The <strong> tag makes text bold and marks it as important.
Step 2: Check syntax correctness
The syntax <strong>Warning</strong> is correct and matches the requirement.
Final Answer:
<strong>Warning</strong> -> Option B
Quick Check:
Important bold text = <strong> [OK]
Hint: Use <strong> tags for important bold text [OK]
Common Mistakes:
Using <b> when importance is needed
Using <i> or <em> which italicize text
Incorrect tag closing
3. What will be the visual output of this HTML snippet?
<p>This is <strong>very important</strong> text and this is <b>just bold</b> text.</p>
medium
A. Both 'very important' and 'just bold' appear bold, but only 'very important' is marked important.
B. 'very important' is italic, 'just bold' is bold.
C. 'very important' is normal, 'just bold' is bold and important.
D. Both texts appear normal without bold styling.
Solution
Step 1: Understand visual effect of <strong> and <b>
Both tags make text bold visually.
Step 2: Understand semantic difference
<strong> marks text as important; <b> only styles text bold without importance.
Final Answer:
Both 'very important' and 'just bold' appear bold, but only 'very important' is marked important. -> Option A