Pr.Pg Next Pg

<SAMP>..</SAMP> tag tutorials

  • The HTML <SAMP> element contains text that corresponds to a sample output from programs or scripts.

  • The content of this element is usually rendered by user agents with a fixed-width font style.

  • <SAMP> tag has following attributes:

 

Sr No

Attributes

Descriptions

1

ID

The ID attribute assigns an identifier to the associated element. This identifier must be unique in the document.

2

Style

This attribute is used to define presentational attributes for the containing element, and its value should be composed by style sheets properties

3

Title

The purpose of this attribute is to provide a title for the element. Its value must be a short and accurate description of the element.

4

Dir

This attribute indicates the direction in which the texts of the element must be read.

 

  • The HTML <SAMP> element is supported by all major browsers like, Chrome, Firefox, Internet Explorer, Safari, Opera etc.

 

Syntax:

<body>

<samp>some text </samp>

</body>

 

Example: HTML program to demonstrate SAMP element

Output:
Pr.Pg border                                              Next Pg