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 trial

JavaScript

text content of P in pug

Hello everyone, copy and pasting the text from the barnyard ipsum website into the Paragraph element in the index.pug file creates new elements with the text. This is the image to show what I'm talking about. Is there a way to solve this, thanks!

1 Answer

Hi Henry, you would need to use the pipe symbol to achieve this:

      p
        | Brussel sprouts cow,
        | rabbits a gates a, storage shed fences.
        | bull bowels cat chicken cow, calf donkey duck.
        | Mooo cat daisys, grunt i.

Start by declaring the p tag, then on a new line, indent and place the pipe symbol: |. After each pipe symbol, you can enter a sentence.