HTML: Formatted text
Sometimes you need to insert text while retaining its original formatting. Let's take a look at Mayakovsky's famous "ladder" from the poem "To Sergei Yesenin.

Vladimir Mayakovsky believed that it was in this form that the rhythm of verse could best be framed.
It is very difficult to format such text using special characters in HTML. You have to "juggle" with space characters. These markings will be very difficult to maintain in the future as a result:
<p>As the saying says,</p>
<p> you are</p>
<p> now far.</p>To solve this problem, there is a special tag called <pre>, whose task is to display the text within itself while saving all the space characters. By default, the <pre> tag outputs text in a monospaced font in which all characters have the same width, unlike regular fonts.
<pre>
As the saying says,
you are
now far.
Void and stars,
a stodgy kind
passover.
Not a payday,
not a whiskey bar.
Sober.
</pre>Inside the pre tag, you can use tags to format the text: <i>, <em>, <b>, <strong>.
Instructions
Add any text to the <pre> tag and paste it into the editor. Try different versions of the texts.
If you've reached a deadlock it's time to ask your question in the «Discussions». How ask a question correctly:
- Be sure to attach the test output, without it it's almost impossible to figure out what went wrong, even if you show your code. It's complicated for developers to execute code in their heads, but having a mistake before their eyes most probably will be helpful.
Your exercise will be checked with these tests:
const { test } = require('tests');
test(({ query, expect }) => {
const pre = query(document, 'pre');
expect(pre).to.be.visible;
});Teacher's solution will be available in:
20:00
