" tag after the text that needs to be wrapped to achieve the line wrap operation; 2. First use "
" and "
" to include the text, and then when needed Just use the "Enter" key to wrap the text after wrapping it."/> " tag after the text that needs to be wrapped to achieve the line wrap operation; 2. First use "
" and "
" to include the text, and then when needed Just use the "Enter" key to wrap the text after wrapping it.">

Home >Web Front-end >HTML Tutorial >How to wrap html text

How to wrap html text

青灯夜游
青灯夜游Original
2021-06-03 15:59:4379457browse

HTML text wrapping method: 1. Insert the "
" tag after the text that needs to be wrapped to achieve the wrapping operation; 2. First use "

" and "" contains text, and then use the "Enter" key to wrap the text after the text that needs to be wrapped. 

How to wrap html text

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

html text wrapping method 1:
Tag

<p>测试文本!测试文本!测试文本!<br/>测试文本!测试文本!测试文本!</p>

Output:

测试文本!测试文本!测试文本!
测试文本!测试文本!测试文本!

Description:

The
tag inserts a simple newline character.


tag is an empty tag, meaning it has no closing tag.

html text wrapping method 2: Use the

 tag and enter key 

<pre class="brush:php;toolbar:false">
	测试文本!测试文本!
	测试文本!
	测试文本!
	测试文本!测试文本!

Output:

How to wrap html text

Description:

 tag can define pre-formatted text. Text enclosed in <pre class="brush:php;toolbar:false"> tag elements usually preserves spaces and newlines. The text will also be rendered as a fixed-width font. <p>Recommended tutorial: <a href="http://www.php.cn/course/list/11.html" target="_blank" textvalue="html视频教程">html video tutorial</a></p>

The above is the detailed content of How to wrap html text. 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