I have been reading about the difference between kbd
, samp
and code
elements. I read about them on MDN and the following two posts:
Basically kbd
represents computer input, samp
represents computer output and code
represents programming language code. E.g. consider the following HTML paragraph:
<p>
I typed<kbd> Hell yeah Blast </kbd>
in cmd. The computer ran the code<code> console.log("Run! blasting in 30 secs..."); delay(30000); blastPC(); </code>
and the cmd printed<samp>
Run! blasting in 30 secs...
</samp>
.</p>
The input is in kbd
tags, the programming code is in code
tags and computer output is in samp
tags. Everything is fine. My question is:
If I just use samp
tag in place of kbd
and code
tags would it make any difference to assistive technologies like screen readers? Would any assistive technology (more specifically screen readers) pronounce the content in samp
tag differently from kbd
content?
Would any web browser render their corresponding contents on screen differently?
P.S: If the question is too broad as per stackoverflow rules then my question is only for screen reader not any other assistive technmology.