Blocs creates <p> for list items

I added a list to my page. In the created html code it looks like this:

			<ul>
				<li>
					<p>
						Display your existing calendar events
					</p>
				</li>
				<li>
					<p>
						Create new events when you use the app
					</p>
				</li>
			</ul>

Why does it add the paragraph elements? It results in a big spacing between the list items.
Thanks, Markus

All text is placed in either a p tag or a heading tag.

If you want to put text directly in a li tag, use the code widget to create your list manually.

https://help.blocsapp.com/knowledge-base/html-widget/

Or use a paragraph and set the spacing to none to remove the additional spacing.

https://help.blocsapp.com/knowledge-base/spacing/

Even if allowed, why are you using p inside li?

I don’t think he wants p tags inside of li tags. This is a limitation of how Blocs creates content in lists. Lists can also contain buttons, images etc, however, there is only one way to add text to Blocs using Brics and that’s with either a p, label or a heading. So when you want to add just text to a list the only way is with a text tag.

1 Like

Thanks all for your help!

1 Like

@markusloffler if you create li items without p tags, you’ll see that these are not styled, e.g. don’t have the same font face as set inside the project default settings (if it was changed). Same for color etc.

1 Like