Important text
In HTML, the <strong>
tag indicates that the content carries more importance, seriousness, or urgency. Visually, most browsers display content in the <strong>
tag identically to the content inside the <b>
tag — bold. If they look the same, in which cases should you use the <strong>
tag? This is one of the most common reasons for confusion among new developers, so let us walk you through a metaphor.
The <b>
tag makes the marked text stand out in a way that a cowboy in a white hat would stand out from a group of cowboys in black hats — by being more noticeable without the different color adding more importance. Adding the <strong>
tag is like giving a cowboy a sheriff's badge, thus denoting their higher rank. Use the <strong>
element to mark content that is more important than the surrounding text — for example, warnings.