HTML Samp Tag
Reference on the Samp Tag of HTML, its useful example, and a list of its allowed attributes.
The HTML samp element is used to markup samples of source code, such as HTML, css, JavaScript. Etc. Rendering code as text is done by replacing ">" with ">" and "<" with "<".
Most sites are using pre instead.
Attributes
Standard Attributes
| Attribute: | Value: | Description: | DTD: |
| Attrs | Other Attributes | Common, Event, I18n | STF |
DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.
Example
The below shows how to markup code samples in HTML pages, using samp tags.
<samp>
<!DOCTYPE html>
<html lang="en">
<head>
<title>My first Website</title>
</head>
<body>
<p>My first Website.</p>
</body>
</html>
</samp>