" 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>Article>Web Front-end> How to wrap html text

How to wrap html text

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

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

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

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

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

Output:

How to wrap html text

Description:

tag can define pre-formatted text. Text enclosed in 
 tag elements usually preserves spaces and newlines. The text will also be rendered as a fixed-width font. 

Recommended tutorial: html video tutorial

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