"."/> ".">

Home  >  Article  >  Web Front-end  >  How to set nested p tags not to wrap in html5

How to set nested p tags not to wrap in html5

WBOY
WBOYOriginal
2022-01-23 15:55:254086browse

In HTML5, the display attribute can be used to set the nested p tag to be displayed without wrapping. The function of this attribute is to specify the type of element generation box. When the value of the attribute is set to "inline", there will be no line before and after the element. Line breaks will be displayed without line breaks, and the syntax is "

".

How to set nested p tags not to wrap in html5

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

html5How to set the nested p tag not to wrap

The display attribute specifies the type of box that the element should generate.

Some of the attribute values ​​​​of this attribute are as follows:

How to set nested p tags not to wrap in html5

The example is as follows:



 
123


这两个段落生成内联盒子,和它的结果

这两个元素之间没有距离。

Output result:

How to set nested p tags not to wrap in html5

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to set nested p tags not to wrap in html5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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