Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChaben Alagbay
2,704 PointsWhat is a <pre></pre> tag?
What is a <pre></pre> tag in other words? When do you use it? Thanks
2 Answers
Victor Mercier
14,667 PointsHi, here is my understanding of a pre tag : The <pre> is used tag to define preformatted text. Text in a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks. Please mark as best answer if helped you!
Sumana Vittal
4,909 PointsThe pre tag displays the text embedded within the pre tag as it is written. It is rendered using the monospace font. Suppose you want to display piece of text as it is in the browser, then just place it between pre tag. Hope it helped you understand.
Tadjiev Codes
9,626 PointsTadjiev Codes
9,626 Pointshttps://www.w3schools.com/tags/tag_pre.asp It basically has it's own format of showing the paragraph. You can see the exercise in W3Schools)