Description
The HTML element <strong>
is used to define a strongly emphasized text in the context used, which is usually displayed as bold text by browsers.
Difference between <strong>
and <b>
elements.
- Both the elements display their text in bold typeface, but only the
<strong>
element conveys importance in the context used. - It is recommended to avoid using the <b> element, and use the CSS property
font-weight: bold;
to make the text bold.
The below table summarizes its usage.
Usage Details | |
Placement | It is displayed as an Inline element. |
Contents | It can contain Inline elements and text. |
Tags | Both the opening and closing tags are required. |
Versions | HTML 2, 3.2, 4, 4.01, 5 |
Syntax
Here is the basic syntax of the <strong>
element.
<strong>...</strong>
Examples
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example - HTML Element strong</title>
</head>
<body>
<p>This paragraph contains a <strong>strong</strong> text, which has emphasis and special importance in the context used.</p>
</body>
</html>
Attributes
The following table shows the list of supported and unsupported attributes for the <strong>
element.
Attribute Type | Details |
Element-Specific Attributes | The tag <strong> doesn't have any element-specific attributes. |
Global Attributes | Like all other HTML tags, the tag <strong> supports the HTML Global Attributes. |
Event Attributes | The tag <strong> also supports the HTML Event Attributes. |
Browser Compatibility
The tag <strong>
is supported in all modern browsers.
- Google Chrome 1+
- Internet Explorer or Edge 2+
- Firefox 1+
- Apple Safari 1+
- Opera 2.1+