Home
HTML
HTML Computer Code
Tryit: code inside pre
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <p>The code element does not preserve whitespace and line-breaks.</p> <p>To fix this, you can put the code element inside a pre element:</p> <pre> <code> x = 5; y = 6; z = x + y; </code> </pre> </body> </html>