- 1
Can someone tell me the difference between the<samp> and <kbd> codes in HTML..??đ€
3 RĂ©ponses
+ 8
Here's a post with an answer which can be of use.
https://www.sololearn.com/Discuss/1686772/
+ 5
uncommon tag, i see. they dont have much purpose other than semantic.
kbd is as much i remember is to represent keyboard input like <kbd>ctrl</kbd> it doesnt have much effect on its own. but some css could help
kbd{
font-family: monospaced;
padding: 3px;
border-radius: 2px;
background: #EEE;
box-shadow: 1px 1px 0 #3338 inset, -1px -1px 0 #FFF8 inset;
}
samp... i cant remember.. a sample or something, probably.
the good thing is they're represent something clear of what they supposed to mean. so less <span class="keyboard"> and more <kbd> i guess
https://code.sololearn.com/Wo5fKP68zyGD/?ref=app
+ 1
Please accept my sincere gratitude..âïž