🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

<strong>

AI & DATA SCIENCE // strong-tag

The <strong> element marks text as having strong importance, seriousness, or urgency — semantically meaningful bold text.

Syntax

<strong>Warning:</strong> this action cannot be undone.

Deep Dive Course

**`<strong>`** renders as bold by default, but unlike `<b>`, it carries real semantic meaning: it tells the browser and assistive technologies that the content is **important**. Screen readers may change vocal emphasis when announcing `<strong>` text. You can nest multiple `<strong>` elements to indicate increasing levels of importance relative to their surrounding content.

1Understanding <strong>

`<strong>` renders as bold by default, but unlike <b>, it carries real semantic meaning: it tells the browser and assistive technologies that the content is important. Screen readers may change vocal emphasis when announcing <strong> text. You can nest multiple <strong> elements to indicate increasing levels of importance relative to their surrounding content.

💡

Don't overuse <strong> for entire paragraphs — if everything is 'strongly important', nothing stands out, and it degrades the experience for screen reader users who rely on it as a genuine signal.

editor.html
<p><strong>Warning:</strong> unsaved changes will be lost.</p>
localhost:3000

2Practical Example

Here is a real-world application of <strong> showing how it is used in production HTML.

editor.html
<!-- Nesting increases relative importance -->
<p><strong>This field is required. <strong>Do not leave it blank.</strong></strong></p>
localhost:3000

3Best Practices

Follow these guidelines when working with <strong>:

1. Reserve <strong> for content that is genuinely important, urgent, or a warning

2. Don't use <strong> purely for visual bold styling — use CSS font-weight for that

3. Combine with clear wording (e.g. 'Warning:', 'Required:') rather than relying on styling alone

⚠️

Tip: Don't overuse <strong> for entire paragraphs — if everything is 'strongly important', nothing stands out, and it degrades the experience for screen reader users who rely on it as a genuine signal.

editor.html
<p><strong>Warning:</strong> unsaved changes will be lost.</p>
localhost:3000

Examples

Example 01Basic Usage
<p><strong>Warning:</strong> unsaved changes will be lost.</p>
Example 02Advanced Example
<!-- Nesting increases relative importance -->
<p><strong>This field is required. <strong>Do not leave it blank.</strong></strong></p>

Best Practices

  • Reserve for content that is genuinely important, urgent, or a warning
  • Don't use purely for visual bold styling — use CSS font-weight for that
  • Combine with clear wording (e.g. 'Warning:', 'Required:') rather than relying on styling alone

Interview Question

How should <strong> be used in forms or error messages, and why does it matter for accessibility?

Hint: Think about how a screen reader user experiences a page versus a sighted user.

Wrapping critical error text (e.g. 'This field is required') in <strong> ensures screen readers convey its urgency, not just its bold visual style. A sighted user sees bold text; a screen reader user hears it announced with added emphasis. Relying only on CSS bold styling (or color) on a <span> would visually look identical but communicate nothing extra to assistive technology — a common accessibility failure.

Exercises

EasyPractice using <strong> in a real scenario.
View Solution
<p><strong>Warning:</strong> unsaved changes will be lost.</p>

Frequently Asked Questions

How should <strong> be used in forms or error messages, and why does it matter for accessibility?

Wrapping critical error text (e.g. 'This field is required') in ensures screen readers convey its urgency, not just its bold visual style. A sighted user sees bold text; a screen reader user hears it announced with added emphasis. Relying only on CSS bold styling (or color) on a would visually look identical but communicate nothing extra to assistive technology — a common accessibility failure.

Related Functions

b-tagem-tag