Creating paragraphs in a tex block (t

Strictly speaking you should not have line returns in a paragraph, a line return would indicate that you need a new paragraph.

A paragraph is a subsection of text marked by the beginning of a new line, indentation or increased interlinear space. By adding carriage returns into a <p></p> tag, you are essentially making one semantic paragraph look like multiple paragraphs. This is quick and easy but is not correct for one simple reason.

The vertical rhythm of your page (i.e. the spacing between paragraphs, headers and other elements) is dependent on the setting of top and bottom margins around HTML elements such as <p>'s. By adding a line break (a <br> in HTML) you have introduced an element that is outside of the scope of these spacings. There is no reliable way to accurately space a <br> tag in order to preserve vertical rhythm.

So basically if you need a new paragraph (in the true definition sense) then add a new <p> tag - i.e. in your case with Foundation, add a new paragraph stack.

Odd paragraph formatting can also often come from simply adding HTML block level elements within a <p>. This is not allowed in HTML and browsers will break it apart.

So putting a list (<ul> for example) within a paragraph is not allowed. While you can do this within RW, the browser will intercept it and break it apart to form valid HTML again. It will give you the first part of the text within a closed <p></p> tag pair, then a closed <ul></ul> pair followed by another closed <p></p> pair.

This means of course that your rendered HTML is different than what you think you added. Foundation paragraphs (& my BWD paragraph stacks) try to help with this by applying your chosen formatting to the outer stacks wrapper <div> that surrounds all of the content. There are however some CSS properties that this will not work for.

So, in summary, to do things reliably and correctly (outside of styled text of course) think of what you want to achieve in normal (non web page) terms. If you want a paragraph, followed by a list, followed by a paragraph then do just that. Add a paragraph stack, followed by a list stack, followed by another paragraph.

I realise that this is less convenient than just banging everything into one paragraph stack but if you want proper typography spacing and formatting then this is the harsh truth. As with all things, precision and perfection are not always synonymous with convenience and you reap what you sow.

5 Likes