1

Is there a "best way". Something that sort of makes the portion of code look inset?

For instance, how SO displays "code" sections on posts for example?

I know Bootstrap has "Wells" but when not using it, is there a particular way that is functional looks nice?

1 Answer 1

2

You can use the tag pre or code for that kind of things.

code { 
    background: rgba(0,0,0,.2)
}

pre {
    white-space: pre-wrap;
    background: rgba(0,0,0,.2)
}
The <code>&lt;code&gt;</code> tag.

<pre>
Here's a  &lt;pre&gt; tag. some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text 
</pre>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.