The Preformatted Text Element will preserve the extra white-space (i.e. tabs, new line characters) of the content within as it is rendered on the webpage. This makes it useful for outputting code or anything really that requires the original state of the text to be preserved.
In this video we compare the differences between pre and a regular HTML element as well as explore a way in which you can combine this tag with PHP.
For your reference:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
16 Comments