W3-Video WEB Tutorials

w3-video.com is a Free eLearning Website with over 500 video tutorials on HTML5, XAMPP, .htaccess, Firefox, Notepad++

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

samp ... ⁄samp

Share it

samp intro samp browser display samp parents - children samp syntax

HTML5 samp element

The samp element allows you to mark up a sample of computer output. »video

About samp

Display & support samp

Firefox iconChrome iconIE iconOpera iconSafari icon

Parents, children samp

Attributes samp

Syntax samp

1<samp> ... </samp> »video

Attributes and Values samp (comma separated)

<sampattribute="attribute_value(s)"> Video Examples
1. specific attributes
All Specific Attributes
2. global attributes
1.accesskey=keyboard key»img<samp accesskey="h"> ... </samp>
2.class=class name»html »img<samp class="class_name"> ... </samp>
3.contenteditable="",  , true, false »html<samp contenteditable="true"> ... </samp>
4.contextmenu=menu id value»html<samp contextmenu="menu_id_value"> ... </samp>
5.data-*= value -<samp data-http-error="404"> ... </samp>
6.dir=ltr, rtl, auto»html<samp dir="ltr"> ... </samp>
7.draggable= true,  , false»img<samp draggable="false"> ... </samp>
8.dropzone= copy, move, link, string:, file: -<samp dropzone="copy"> ... </samp>
9.hidden= "",  , hidden»html »img<samp hidden="hidden"> ... </samp>
10.id=id name»html »img<samp id="unique_id_name"> ... </samp>
11.itemid= URL --
12.itemprop= string »link »a-
13.itemref= string --
14.itemscope= "",  , itemscope--
15.itemtype= absolute URL --
16.lang=language code »html »head»title »img<samp lang="en"> ... </samp>
17.spellcheck="",  , true, false»html<samp spellcheck="true"> ... </samp>
18.style=CSS property:value»html »img<samp style="color:red"> ... </samp>
19.tabindex= integer »img<samp tabindex="3"> ... </samp>
20.title=text»html »link»style »abbr»dfn
»img »meter
<samp title="html page"> ... </samp>
21.translate="", yes, no»html »img<samp translate="yes"> ... </samp>
All Global Attributes
3. global event attributes
1.onclick=script» list<element onclick="script" > ...
2.ondblclick=script» list<element ondblclick="script" > ...
All Event Attributes

Video demonstration samp element

HTML5 samp element: mark up computer output

min video details
00:00 video tutorial: samp element
00:04 the samp element allows you t mark a sample of computer output
00:09 in this paragraph, 'Unknown property' represents a sample of computer output and can be marked using samp element
00:13 note: after running a sequence of code, the computer returned an output; the output is 'Unknown property' → this output represents a sample of computer output and can be marked using samp element
00:28 marking 'Unknown property' as sample computer output through samp element

For more information about the samp element, please see the specs: W3CWHATWG