Reputation: 48946
What is the HTML
element that one can use in order to insert source code styled text in the page display?
Thanks.
Upvotes: 0
Views: 358
Reputation: 814
<tt>text</tt>
will give you a fixed-width font. Wrapping this inside <pre></pre>
will make formatting be preserved. For example, <pre><tt>code here</tt></pre>
. You will still need to use html codes for characters such as <
and >
(<
and >
respectively).
Upvotes: 1
Reputation: 3586
Am I missing something? The tags < code > or < pre > might serve you purpose.
Upvotes: 2