In web page layout, such as article list title layout, no matter how much text you want to display in a new line, you need to force the content to be displayed on one line. This can be achieved with the nobr tag.
##
html tutorial)
nobr tag features:
If you do not encounter the br line break tag , the content is displayed in one line. If the br line break tag is encountered, the content will automatically wrap after adding br line break.html nobr ban content line wrapping case
If there is a 4-line article title list, set the width to 200px; the css line height is 22px; for the 4-column content, we Adopt ul li list layout, two of them addFull html source code:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>nobr标签实例</title> <style> ul{ border:1px solid #000; width:200px;} li{ width:200px; line-height:22px} </style> </head> <body> <ul> <li><nobr>第一排内容文字多加nobr标签测试内容</nobr></li> <li><nobr>第二排内容文字多加nobr标签不能排下</nobr></li> <li>第三排内容文字多没有加nobr标签</li> <li>第四排 文字少能排下</li> </ul> </body> </html>
The above is the detailed content of HTML