Below we have a basic example where we have used the <kbd>
tag wherever we have mentioned the Keyboard keys in text on our webpage.
Now, we will show you how to use <kbd>
tag inside <samp>
tag. Whenever <kbd>
tagis nested inside the <samp>
tag, it represents that the input is responded back to the user by the system:
<kbd>
Tag AttributesThis element does not have any specific attributes although this element supports Global attributes and Event attributes.
<kbd>
TagThe default CSS Settings or value for <kbd>
tag is as shown below:
kbd {
font-family: monospace;
}
Copy
<kbd>
tagFollowing browsers support this attribute:
Firefox 1+
Google Chrome 1+
Internet Explorer 2+
Apple Safari 1+
Opera 4+