HTML samp 标签
htmlweb developmentfront end technology更新于 2025/8/4 10:52:17
HTML 中的 <samp> 标签是一个短语标签,类似于 <em>、<code>、<strong> 等,用于格式化 HTML 文档中的文本。它也用于显示计算机程序的输出。
现在让我们看一个实现 <samp> 元素的示例。 −
示例
<!DOCTYPE html> <html> <body> <h2>OS issues</h2> <p>If the system hangs...</p> <samp>Press CTRL + ALT + DELETE and delete the current tasks.</samp> </body> </html>
输出

在上面的例子中,我们设置了<samp>标签内的文本 −
<samp> Press CTRL + ALT + DELETE and delete the current tasks. </samp>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

