Top "Pre" questions

The <pre> element in HTML represents preformatted text.

How to insert spaces/tabs in text using HTML/CSS

Possible ways: <pre> ... </pre> or style="white-space:pre" Anything else?

html css tabs space pre
How to display raw html code in PRE or something like it but without escaping it

I'd like to display raw HTML. We all know one has to escape each "<" and ">" like this <…

html pre
How to use css to change <pre> font size

pre{font-family:cursive;font-style:italic;font-size:xxx-small} How to change pre font size?

html css font-size pre
Display element as preformatted text via CSS

Is there any way to emulate the display of a pre element via CSS? For example, can I keep the …

html css whitespace pre
HTML <pre> tag values get horizontal scroll bars,how to format it?

This is my blog page. Sometimes I have to use C#,PHP and other code snippets in the blog. Therefore …

html pre
How to preserve whitespace indentation of text enclosed in HTML <pre> tags excluding the current indentation level of the <pre> tag in the document?

I'm trying to display my code on a website but I'm having problems preserving the whitespace indentation correctly. For instance …

html whitespace indentation pre
How to make Twitter Bootstrap's <pre> blocks scroll horizontally?

Per the examples https://getbootstrap.com/docs/4.3/content/code/#code-blocks, bootstrap only supports vertically-scrollable and word-wrapped <pre> blocks …

html css twitter-bootstrap horizontal-scrolling pre
HTML <pre> tag causes linebreaks

I'm using CSS (via JQuery , but not relevant to this question) to highlight certain elements within an HTML file: I'm …

html css newline line-breaks pre
how to set the text of a pre tag using jquery

I'm using a pre tag to hold some raw formated text that has carriage returns. When the page is first …

jquery html pre
HTML justify text-align with <pre> tag

I have a problem with the text-align "justify" inside a paragraph with format and fixed width, because I want the …

html fixed-width pre text-justify