Tsallaka zuwa abun ciki
Justice Tech School

Computer Code Elements

code marks a short piece of code. pre keeps spaces and line breaks, so it is used for code blocks. kbd shows keys to press, samp shows program output and var marks a variable name.

Example
<p>Use the <code>console.log()</code> function. Press <kbd>Ctrl</kbd> + <kbd>S</kbd> to save.</p>
<pre>function hello() {
  return "hi";
}</pre>

Exercise

Keep the spaces and line breaks.

<>line 1
  line 2</>

Quiz Test

Which element is for keyboard keys?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.