The snippet below will create a pre formatted. But the problem is when you have a <pre>
inside many tags, the text displayed after skipping to many columns it become hideous to the eye:
<body>
<main>
... // many other tags
<pre>
<code>
# include <iostream>
using namespace std;
int main()
{
if(true)
{
return 1;
}
return 0;
}
</code>
</pre>
</main>
</body>
I want the pre-formatted text to be displayed at the column 0 without indenting the code element to the the row 0:
<body>
<main>
... // many other tags
<pre>
<code>
... content
</code>
</pre>
</main>
</body>
Is this possible. Thanks.
2
Answers
But see if I can help you solve the problem
Add a style on your
pre
tag not enough to achieve the correct output, so I add an script.Before
After (Edited) -> CSS(not as expected)
After 2 (New) ->JS(working!)