Search code examples
htmlhyperlinkpre

Can you add a hyperlink inside of a <pre></pre>?


Here's the code I'm working with more or less.

<!DOCTYPE html>
<html lang="en">
<body>
<header></header>
<div class="container">
    <section>
        <h1>Title</h1>
        <pre>
            Text <A herf="linkurl.com">Link</A> Text
        </pre>
    </section>
</div>
<footer></footer>
</body>
</html>

I'm trying to get the URL Hyperlink to work inside of the <pre></pre>. What am I missing here?


Solution

  • You are missing the fact that you spelled href as herf.