How to avoid a new line with the ‘p’ tag with CSS?

Spread the love

Sometimes, we want to avoid a new line with the ‘p’ tag with CSS.

In this article, we’ll look at how to avoid a new line with the ‘p’ tag with CSS.

How to avoid a new line with the ‘p’ tag with CSS?

To avoid a new line with the ‘p’ tag with CSS, we make it display inline.

For instance, we write

#container p {
  display: inline;
}

to make the p element in the element with ID container display inline with display: inline;.

Conclusion

To avoid a new line with the ‘p’ tag with CSS, we make it display inline.

Leave a Reply

Your email address will not be published. Required fields are marked *