HTML <strong> 标签用于使文本更强,更重要,其中的文本通常以粗体显示。
如果我们在段落或任何元素中编写内容,但内容中出现了一个重要的术语,我们可以使用 <strong> 标签将重要单词加粗。
语法
<strong>...</strong>
属性
HTML 强标签支持 HTML 的 全局属性 和 事件属性。
<strong> 标签示例
下面的例子将说明<strong> 标签的用法,在哪里、何时以及如何在句子中的任何特定文本上听起来很强。
<strong> 标签简单示例
在以下示例中,让我们演示 <strong> 标签。
<!DOCTYPE html>
<html>
<body>
<p>This is normal paragraph</p>
<strong>
This is strong paragraph!
</strong>
<p>
I am <strong> QikepuCom</strong>
</p>
</body>
</html>
<strong> 使用css示例
考虑以下示例,我们将演示 <strong> 标签以及 CSS 属性的工作原理
<!DOCTYPE html>
<html>
<head>
<style>
strong {
font-style: italic;
}
.tp {
color: green;
}
</style>
</head>
<body>
<p>This is normal paragraph</p>
<strong>
This is strong paragraph!
</strong>
<p>
I am <strong class="tp"> tutorialspoint </strong>
</p>
</body>
</html>
支持的浏览器
浏览器 | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
<strong> | Yes | Yes | Yes | Yes | Yes |