个性化阅读
专注于IT技术分析

HTML samp标记

点击下载

本文概述

HTML <samp>标记是一个短语标记, 用于表示浏览器中计算机程序或脚本输出的样本。

在<samp>和</ samp>标签之间编写的内容以浏览器的默认等宽字体呈现。

注意:<samp>标记尚未被弃用, 但是你也可以使用CSS属性获得相同的结果。

句法

<samp>Write sample output here.....</samp>

以下是有关HTML <samp>标记的一些规范

Display Inline
开始日期/结束日期 开始和结束标签
Usage textual

<!DOCTYPE html>
<html>
<head>
	<title>HTML samp tag</title>
	<style>
     body{
     	text-align: center;
              }
    </style>
</head>
<body> 
<h2>Example of samp tag</h2>
<p>I am trying to install a software on my system but it is continuously giving an error message:
</p>
<p><samp>Error 5: Access is denied.</samp></p>
</body>
</html>

立即测试

输出:

HTML samp标签

属性

特定于标签的属性:

<samp>标记不包含任何特定属性。

全局属性:

<samp>标记支持HTML中的全局属性

事件属性:

<samp>标记支持HTML中的事件属性。

支持的浏览器

Element Chrome IE Firefox Opera Safari
<samp> Yes Yes Yes Yes Yes
赞(0)
未经允许不得转载:srcmini » HTML samp标记

评论 抢沙发

评论前必须登录!