Home > Web Front-end > HTML Tutorial > How to prevent line breaks between two p tags in html?

How to prevent line breaks between two p tags in html?

黄舟
Release: 2017-07-03 11:57:53
Original
14288 people have browsed it

How to avoid line breaks between two p tags in html? If I write two p tags in succession

aaa

bbb

, then the output result will be
aaa
bbb
and the result I want It’s aaabbb, what should I do, fellow prawns?

You can also use the other two tags, as long as you can achieve this effect, but do not input the type in the tag , such as text with a border.
Please help me, it’s urgent.

It’s too easy. .

<style>
p{padding:0px; margin:0px;}
</style>
<p>aaa</p> <p>bbb</p>
Copy after login

But it is recommended not to use it this way. The existence of p is originally used as a paragraph. This is the so-called Semanticization. .

<span>aaa</span><span>bbb</span>
Copy after login

Use tags
will not break lines

The above is the detailed content of How to prevent line breaks between two p tags in html?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template