What is a <code> tag?

Experience Level: Junior
Tags: HTML


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.

    <title>Tag pre</title>
        <figcaption>Code pre</figcaption>
Related HTML job interview questions


No Comments Yet.
Be the first to tell us what you think.
HTML for beginners
HTML for beginners

Are you learning HTML ? Try our test we designed to help you progress faster.

Test yourself