The HTML <strong>
element gives text strong importance and is typically displayed in bold.
Content categories | Flow content, phrasing content, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | None, must have both a start tag and an end tag. |
Permitted parents | Any element that accepts phrasing content, or any element that accepts flow content. |
Permitted ARIA roles | Any |
DOM interface | HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. |
Attributes
This element only includes the global attributes.
Usage notes
The <strong>
element is for content that is of "strong importance," including things of great seriousness or urgency (such as a warning). This could be a sentence that is of great importance to the whole page, or you could merely try to point out that some words are of greater importance compared to nearby content.
Typically this element is displayed in boldface. However, it should not be used simply to apply bold styling; use the CSS styling for that purpose. Use the <b>
element to draw attention to certain text without indicating a higher level of importance. Use the <em>
element to mark text that has stress emphasis.
As exemplified in the specification, it is acceptable to use <strong>
to mark up “labels” of paragraphs representing notes, warnings, etc.
Examples
<p>When doing x, <strong>you must do y before proceeding</strong>.</p> <p><strong>Note:</strong> Before proceeding with x, you must do y.</p>
Result
When doing x, you must do y before proceeding.
Note: Before proceeding with x, you must do y.
<b> vs. <strong>
It is often confusing to new developers why there are so many ways to express the same thing on a rendered website. <b>
and <strong>
are perhaps one of the most common. Should I use <b>
or <strong>
? Don't they both do the same thing?
Not exactly. The <strong>
element is for content that is of greater importance, while the <b>
element is for drawing attention to some text without increasing importance.
It may help to realize that both are valid and semantic elements in HTML5, where the default styling for most devices happens to be to bold the content for both elements. (Some older devices actually underline <strong>
.) They are meant for certain scenarios, and if you want to bold text for other, more purely decorational reasons, you should actually be using CSS styling.
The intended meaning or purpose should be what determines what route you take. Communicating meaning is what semantics is all about.
<em> vs. <strong>
While in HTML4, <strong>
simply indicated a stronger emphasis, in HTML5, the element is described as representing "strong importance for its contents." This is an important distinction to make.
While <em>
is used to change the meaning of a sentence as spoken emphasis does ("I love carrots" vs. "I love carrots"), <strong>
is used to give portions of a sentence added importance (e.g., "Warning! This is very dangerous.") Both <strong>
and <em>
can be nested to increase the relative degree of importance or stress emphasis, respectively.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of '<strong>' in that specification. |
Living Standard | |
HTML5 The definition of '<strong>' in that specification. |
Recommendation | |
HTML 4.01 Specification The definition of '<strong>' in that specification. |
Recommendation |
Browser compatibility
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 1 | Yes | 1 | Yes | Yes | Yes |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | Yes | Yes | Yes | 4 | Yes | Yes | Yes |