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.