# NO BUG: Basic and rich text elements

**URL:** <https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353>\
**Category:** Bugs\
**Tags:** v1-9-4\
**Created:** [January 2, 2024, 11:03pm UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353 "2024-01-02T23:03:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![soum](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/soum/32/6256_2.png) [@soum](https://forum.bricksbuilder.io/u/soum)\
**Post date:** [January 2, 2024, 11:03pm UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/1 "2024-01-02T23:03:29Z")

</div>

Basic text outputs as `<div>text</div>` on frontend. Desired output is `<p>text</p>` as we normally would do in VS Code or any other code editor.

Same with rich text except it does add the p tag but again inside a div like this `<div><p>text</p></div>` why the unnecessary div?

---

<div class="post-metadata">

**Author:** ![Sridhar](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/sridhar/32/22855_2.png) [@Sridhar](https://forum.bricksbuilder.io/u/Sridhar)\
**Post date:** [January 3, 2024, 12:39am UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/2 "2024-01-03T00:39:37Z")

</div>

[Advanced Themer](https://advancedthemer.com/) says hi.

 ![CleanShot 2024-01-03 at 11 .37.22@2x](https://forum.bricksbuilder.io/uploads/default/original/3X/3/8/38214dd5e4998372bd9ae2080f786f5260f4e367.png)

Alternatively, you should be able to overwrite the built-in Basic Text element with modified output to replace the default `<div>` tags with `p` tags.

---

<div class="post-metadata">

**Author:** ![Sridhar](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/sridhar/32/22855_2.png) [@Sridhar](https://forum.bricksbuilder.io/u/Sridhar)\
**Post date:** [January 3, 2024, 3:12am UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/3 "2024-01-03T03:12:16Z")

</div>

> **[Setting p as the default HTML tag for Basic Text elements in Bricks - BricksLabs](https://brickslabs.com/setting-p-as-the-default-html-tag-for-basic-text-elements-in-bricks/)**
>
> One of the most annoying defaults in Bricks is the div tag that gets applied to the output of Basic Text elements. Here goes your text ... Select any part of your text to access the formatting toolbar. via GIPHY It is certainly possible to select p...

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [January 3, 2024, 7:58am UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/4 "2024-01-03T07:58:17Z")

</div>

Hi Soum,  
Thanks so much for your report!

The default tag for the basic text is `<div>`, but you can change it depending on the input. If you are using plain text, set it to `<p>` (or any other tag that fits). If you are using a dynamic data tag that already contains WYSIWYG styles (aka tags), leave it as a div.

 ![image](https://forum.bricksbuilder.io/uploads/default/original/3X/f/b/fb330276d9b94e64db97bd180166aee8254764ab.png)

The rich text element is a WYSIWYG editor, so it adds tags automatically.

---

<div class="post-metadata">

**Author:** ![soum](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/soum/32/6256_2.png) [@soum](https://forum.bricksbuilder.io/u/soum)\
**Post date:** [January 3, 2024, 1:22pm UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/5 "2024-01-03T13:22:28Z")

</div>

Changing it to p tag is adding a 48 px bottom margin, gets removed as soon as I change the p tag back to div tag

---

<div class="post-metadata">

**Author:** ![soum](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/soum/32/6256_2.png) [@soum](https://forum.bricksbuilder.io/u/soum)\
**Post date:** [January 3, 2024, 1:48pm UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/6 "2024-01-03T13:48:50Z")

</div>

Check this out. It’s happening to everyone. This is not normal behaviour and should not exist. Makes no sense to add 1.2 em margin when changed to p tags.

 ![Screenshot 2024-01-03 at 5.47.35 AM](https://forum.bricksbuilder.io/uploads/default/original/3X/9/b/9b846ea106b6e64a75134b7bbea5e50965864d82.jpeg)

---

<div class="post-metadata">

**Author:** ![clickfusion63](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/c/3ab097/32.png) [@clickfusion63](https://forum.bricksbuilder.io/u/clickfusion63)\
**Post date:** [January 3, 2024, 2:53pm UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/7 "2024-01-03T14:53:07Z")

</div>

Why compare the behavior of vscode and bricks? These are different applications for different tasks. That’s why they behave differently. Each widget and html tags have basic styles to make it easier for users to create content. If you don’t like the basic styles, you can always change them to your own, but do not require this from the developers. the solution to your problem in one line of code that needs to be inserted into custom css…

```auto
:where(p) { margin: 0em; }

```

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [January 3, 2024, 3:06pm UTC](https://forum.bricksbuilder.io/t/no-bug-basic-and-rich-text-elements/18353/8 "2024-01-03T15:06:48Z")

</div>

Of course, it makes sense because otherwise, the browser would add its default margin-top and bottom of 1em. If you want that behavior, reset or override the default: Bricks » Settings » Custom CSS: `p { all: revert }` or `p { margin: 0 }`

 ![image](https://forum.bricksbuilder.io/uploads/default/original/3X/8/3/83a84d96ae01397127c88ed994348d3d7419d068.png)
