What is a <code> tag?
Experience Level: Junior
Tags: HTML
Answer
The <code>
element is used to define enclosed text as computer code. It is often paired with the <pre>
element to preserve line breaks and indentation when presenting blocks of computer code.
Related HTML job interview questions
What is a <form> tag?
HTML JuniorWhat is a <pre> tag?
HTML JuniorWhat is a <body> tag?
HTML JuniorWhat is a <html> tag?
HTML JuniorWhat are <h1>...<h6> tags?
HTML Junior