Complete the code to create preformatted text using the correct HTML tag.
<[1]>This text preserves spaces and line breaks.</[1]>
instead of does not preserve spaces and line breaks.
The <pre> tag preserves spaces and line breaks exactly as written.
Complete the code to show a block of code with preserved formatting.
<[1]> function greet() { console.log('Hello!'); } </[1]>
alone does not preserve line breaks.The <pre> tag preserves the indentation and line breaks of the code block.
Fix the error in the code to properly preserve spaces and line breaks.
<pre>This is [1] text.</pre>The text inside a <pre> tag is called preformatted text because it keeps spaces and line breaks.
Fill both blanks to create a preformatted block with a CSS class.
<[1] class=[2]> Line 1 Line 2 </[1]>
loses preformatted spacing.
Use the <pre> tag for preformatted text and add a class name in quotes for styling.
Fill all three blanks to create a preformatted text block with an aria-label and a CSS class.
<[1] class=[2] aria-label=[3]> Example: 1 2 3 </[1]>
instead of loses spacing.
The <pre> tag preserves formatting, the class attribute styles it, and aria-label improves accessibility by describing the block.