12月29号是什么星座| 护士需要什么学历| 家里来猫是什么征兆| 淋巴组织增生是什么意思| 拉屎为什么是绿色的| 病毒感染是什么原因| 染色体是什么| 龙日冲狗煞南是什么意思| 地狱不空誓不成佛是什么意思| 左手经常发麻是什么原因引起的| 石斛有什么作用和功效| 舌苔又白又厚是什么原因| 拔牙能吃什么| 公务员是干什么的| 道字五行属什么| 梦见大蛇是什么意思| 胆结石可以吃什么水果| 2002年属什么| 朱祁镇为什么杀于谦| 什么人适合喝蛋白粉| 花卉是什么| 黑色素缺失吃什么补充最快| 什么是肺结核| 原浆是什么意思| 吃什么对皮肤好| 较真的人是什么性格| 36属什么| 文工团是什么意思| 抽筋是什么原因| 蓝眼泪是什么意思| 劲酒兑什么饮料好喝| 人体第一道防线是什么| 晦气是什么意思| 第三代身份证什么时候开始办理| 突然勃不起来是什么原因| ct能检查出什么| 结痂是什么意思| 风热感冒是什么意思| 琏是什么意思| 风声鹤唳是什么意思| 吃什么药怀孕最快| 绝经前有什么症状| 狗嚎叫有什么预兆| 尿蛋白1十是什么意思| 常吃南瓜子有什么好处和坏处| 什么减肥产品最好| 孕晚期高血压对胎儿有什么影响| 流动人口是什么意思| kbs是什么意思| 无缘无故头疼是什么原因| 什么是肠胃炎| 肌无力是什么原因引起的| 什么是三好学生| 刺青是什么意思| 白带发黄是什么原因| 洗衣机不排水是什么原因| 车厘子是什么季节的水果| 血糖高要注意什么| 垂头丧气是什么意思| 尼古丁是什么东西| 扒灰什么意思| 凉拌菜用什么醋好| lancome是什么牌子的| 子母被是什么意思| 喝黄瓜汁有什么好处| 蝉属于什么类动物| 后羿是什么生肖| 手臂粗是什么原因| 巨蟹女和什么座最配对| 乙肝会有什么表现症状| 3月7号是什么星座| 执勤是什么意思| 马齿苋对什么病最有效| 单个室早是什么意思| 6.15是什么日子| 9月出生的是什么星座| 异类是什么意思| 什么时候减肥效果最快最好| 嘬是什么意思| 手指麻木什么原因| 羊肉和什么相克| 小腿红肿是什么原因引起的| 甲醇对人体有什么伤害| 顶嘴是什么意思| 天枢是什么意思| 王晶老婆叫什么名字| 5月3日什么星座| 耳朵闷闷的堵住的感觉是什么原因| 艾滋病有什么危害| 什么的杨桃| 手心脱皮是什么原因| 舌头中间裂纹是什么病| 逆光是什么意思| 大姨妈来了不能吃什么水果| 吃什么补脑子增强记忆力最快| bp是什么单位| 什么叫活佛| 梦见和老公结婚是什么意思| 前脚底板痛是什么原因| 韩语阿西吧是什么意思| 狗头是什么意思| 手指甲有月牙代表什么| 疱疹性咽峡炎吃什么药| 梦到装修房子是什么征兆| 为什么喝水血糖也会高| 梦到被雷劈是什么意思| 拜读是什么意思| 当兵有什么要求| 骨密度高是什么意思| 发烧吃什么食物比较好| 外阴瘙痒用什么洗液| bata鞋属于什么档次| 什么地点头| 阴阳两虚吃什么食物| 痘痘反复长是什么原因| 杜鹃花是什么颜色| 试纸一条红杠是什么意思| 为什么会胃酸反流| 肺大泡是什么病| 总是拉稀大便不成形是什么原因| 耳鸣吃什么药好| 月经不调去医院要做什么检查| 成什么结什么| 5.29是什么星座| 冬菇有什么功效与作用| 大逆不道什么意思| 例假淋漓不尽是什么原因造成的| 大黄米和小黄米有什么区别| 什么叫肺结节| 什么什么不动| 石光荣是什么军衔| olay是什么品牌| 腹腔淋巴结肿大是什么原因| 过火是什么意思| 什么是散射光| 统招是什么意思| 沉贵宝是什么木| 增生期子宫内膜是什么意思| 阴毛长虱子用什么药| 迷你什么意思| 不劳而获是什么生肖| 认知是什么| 晚上睡觉脚抽筋是什么原因引起的| 绿杨春属于什么茶| 放大镜不能放大的东西是什么| 什么是回避型依恋人格| 去黄疸吃什么药| lm是什么品牌| 矫枉过正是什么意思| 水肿是什么症状| 夏天为什么容易拉肚子| 凌晨两点半是什么时辰| 黑色的屎是什么原因| 脚趾头疼是什么原因| 脑供血不足吃什么食物| 女人手心发热是什么原因| msgm是什么品牌| 1970属什么生肖| 龙眼什么季节成熟| 猪八戒是什么佛| 喜欢吃冰的是什么原因| 双子座是什么星座| 拔草是什么意思| 断生是什么意思啊| 望闻问切的闻是什么意思| 玹字五行属什么| 等不到天黑烟火不会太完美什么歌| 羊头标志是什么车| 漂洗和洗涤有什么区别| 耳朵发炎吃什么药| 胆固醇高是什么| 高血糖可以吃什么水果| 鸽子炖什么补气血| 尿维生素c弱阳性是什么意思| 胎动突然频繁是什么原因| 刷单是什么意思| 初中老师需要什么学历| 因加一笔是什么字| 什么是宇宙| fl是什么| 鼻子下面长痘什么原因| 吃什么补充维生素d| 经常打喷嚏是什么原因| 魏大勋什么星座| 浅表性胃炎吃什么药效果好| 看痔疮挂什么科| 心脏五行属什么| 巧克力的原料是什么| 什么药治尿酸高最有效| 什么是双飞| 乳头状瘤是什么病| 心脏房颤吃什么药好| 健身吃蛋白粉有什么好处和坏处| 为什么会狐臭| 什么的变化| 跟腱炎吃什么药| 雅诗兰黛是什么档次| 铁树开花是什么意思| 朋友是什么| 今天是什么日子 农历| 0代表什么| 精子什么味| 2.25是什么星座| 7月份什么星座| 舌中间有裂纹是什么原因| 支气管扩张是什么原因引起| 天高地厚是什么生肖| 肠脂膜炎是什么病严重吗| sds是什么意思| 鸡蛋为什么这么便宜| 营养心脏最好的药是什么药| 狗狗为什么会咬人| 6代表什么意思| 胃气上逆有什么好的办法治疗| 肺阳虚吃什么中成药| 生化是什么原因引起的| 3月25是什么星座| 上火吃什么| 海马是什么动物| 沙蟹吃什么| 光膀子什么意思| 月经推迟不来吃什么药| 梦见死人是什么兆头| 怀孕20天有什么症状| 一九四九年属什么生肖| 女人吃维生素b有什么好处| 诸行无常是什么意思| 中老年人喝什么奶粉好| 带节奏是什么意思| 什么的大自然| 梦见猫吃老鼠什么意思| 皮肤发红发烫是什么原因| 准生证需要什么材料| 今天立冬吃什么| 炸鱼是什么意思| 同房有点痛什么原因| 7月去青海带什么衣服| 什么是再生障碍性贫血| 盆腔积液是什么| 十万为什么| 卡介苗预防什么病| 手上十个簸箕代表什么| 单纯疱疹病毒是什么病| 脚底发红是什么原因| 孕妇过敏可以用什么药| 黑豆腐是什么做的| 拉直和软化有什么区别| 什么网名好听| 刮宫是什么意思| 嗓子不舒服吃什么药| 爱放屁吃什么药| 词又被称为什么| 妈富隆是什么药| 乳腺导管扩张是什么意思| 收录是什么意思| 两胸之间是什么部位| 娃娃鱼是什么动物| 送什么礼物| 宫保鸡丁是什么菜系| 修成正果是什么意思| 儿童手指头脱皮什么原因引起的| 官印是什么意思| 上火喝什么茶| 男性为什么长丝状疣| 百度Jump to content

收盘:两市大幅下跌 创业板指跌5.02%

From Wikipedia, the free encyclopedia
百度 在建房间数已经达到2963间,已获取项目的总房间数已超过8000间。

This page explains different methods for creating, controlling and preventing line breaks and word wraps in Wikipedia articles and pages.

When a paragraph or line of text is too long to fit on one line, web browsers, like many other programs, automatically wrap the text to the next line. Web browsers usually wrap the line where there are natural breaks such as spaces, hyphens, etc. in the text.

Causing line breaks

[edit]

Newlines

[edit]

There are several ways to force line breaks and paragraph breaks in the text. The simplest method is by inserting newlines; for example:

Markup Renders as
A single newline in the markup 
does not cause a visible line break.

A single newline in the markup does not cause a visible line break.

Two newlines in the markup

causes a paragraph break.

Two newlines in the markup

causes a paragraph break.

Three newlines in the markup


causes an extra-wide paragraph break. This should normally be avoided.

Three newlines in the markup


causes an extra-wide paragraph break. This should normally be avoided.

<br>

[edit]

<br>, <br >, <br/>, <br />

The MediaWiki software uses any of them for a single forced line break. All of them are converted to <br /> in the HTML that browsers read.

MediaWiki also converts </br> to <br />, but this form is invalid. Please correct these tags.

For content that is semantically a list, such as in infoboxes, actual list markup is preferred. See § Lists below.

Markup Renders as
And this line of text<br>will break in the middle.

And this line of text
will break in the middle.

The example below includes four forms that are rendered as line breaks and two that display as plain text.

Wiki source

One <br>Two <br >Three <br/>Four <br />Five < br>Six </ br>Seven

Rendered result

One
Two
Three
Four
Five < br>Six </ br>Seven

<poem>

[edit]

The <poem> extension adds HTML-like tags to maintain newlines and spaces. This is useful for longer blocks of text such as poems, lyrics, mottoes, oaths and the like. These tags may be used inside other tags such as <blockquote>. For example:

Markup Renders as
<poem>
In Xanadu did [[Kubla Khan]]
  A stately pleasure-dome decree:
Where Alph, the sacred river, ran
  Through caverns measureless to man
Down to a sunless sea.

So twice five miles of fertile ground
  With walls and towers were girdled round:
And there were gardens bright with sinuous rills,
  Where blossomed many an incense-bearing tree;
And here were forests ancient as the hills,
  Enfolding sunny spots of greenery.
</poem>

In Xanadu did Kubla Khan
  A stately pleasure-dome decree:
Where Alph, the sacred river, ran
  Through caverns measureless to man
Down to a sunless sea.

So twice five miles of fertile ground
  With walls and towers were girdled round:
And there were gardens bright with sinuous rills,
  Where blossomed many an incense-bearing tree;
And here were forests ancient as the hills,
  Enfolding sunny spots of greenery.

<pre>

[edit]

<pre>...</pre> and its alternatives are typically used to display code; their contents are rendered in monospace with a frame and different background colour. Both markup and newlines within <pre>...</pre> are reproduced verbatim. However, the first newline after <pre> and last newline before </pre> are ignored, allowing the tags to be placed on their own lines without extra empty lines appearing on the page.

Markup
<pre>
{{2x|foo}}<br />bar
[[wiki]]
</pre>
Renders as
{{2x|foo}}<br />bar
[[wiki]]

To evaluate markup while still preserving newlines, the alternatives <pre<includeonly></includeonly>></pre> and {{Pre}} can be used.

Markup
{{Pre |
{{2x|foo}}<br />bar
[[wiki]]
}}
Renders as
foofoo
bar wiki

<nowiki>

[edit]

The effect of the tag <nowiki>...</nowiki> on line breaks is that single and double line breaks are ignored, and you also cannot add a line break with <br />:

Markup
<nowiki>
Single line breaks,
and double line breaks as well,

are ignored,
and the tag <br />
is just displayed as is.
</nowiki>
Renders as
Single line breaks, and double line breaks as well, are ignored, and the tag <br /> is just displayed as is.

There are several ways to enable line breaks in text that uses <nowiki>...</nowiki>:

Solution 1. Use <nowiki>...</nowiki> for each line separately, with <br /> or double newline between lines.

Markup
<nowiki>Around the entire line,</nowiki> <br />
or only around text that must be escaped: <nowiki>{{2x|bar}}</nowiki>.

<nowiki> Extra  spaces   are still collapsed. </nowiki>
Renders as
Around the entire line,

or only around text that must be escaped: {{2x|bar}}.

Extra spaces are still collapsed.

Solution 2: Use <poem>...</poem>.

Markup
<poem><nowiki>Twas bryllyg, and ''y<sup>e</sup>'' slythy toves
  Did gyre and gymble in ''y<sup>e</sup>'' wabe:
All mimsy were ''y<sup>e</sup>'' borogoves,
  And ''y<sup>e</sup>'' mome raths outgrabe.</nowiki></poem>
Renders as

Twas bryllyg, and ''y<sup>e</sup>'' slythy toves
  Did gyre and gymble in ''y<sup>e</sup>'' wabe:
All mimsy were ''y<sup>e</sup>'' borogoves,
  And ''y<sup>e</sup>'' mome raths outgrabe.

When <poem>...</poem> is used with <nowiki>...</nowiki>, the contents must begin on the same line as the tags, because a leading newline will appear in the output. However, the last newline is ignored, so the closing tags may be on their own line.

Markup
<poem><nowiki>
Extra line above
</nowiki></poem>
Renders as


Extra line above

Solution 3: Consider using <pre> instead of <nowiki>...</nowiki>.

Lists

[edit]

Numbered and bulleted lists are created using standard wiki markup. In cases where a plain list without number or bullet is desired, such as in an infobox, many editors will simply create a list using breaks. This method does not apply the semantics of a list, and for those using screen readers it will not sound like a list. For these cases, {{plainlist}} and {{unbulleted list}} both use list markup without numbers or bullets:

Markup Renders as
{{plainlist|
* cat
* dog
* horse
* cow
* sheep
* pig
}}
  • cat
  • dog
  • horse
  • cow
  • sheep
  • pig

Formulas

[edit]

To display formulas with <math> on their own line, Wikipedia:Manual of Style/Mathematics#Using LaTeX markup recommends <math display=block>.

Preventing and controlling word wraps

[edit]

There are several ways to prevent word wraps (line wraps) from occurring in unwanted places. This is an overview of when to use which method.

Non-breaking space

[edit]

The HTML entity &nbsp; is a non-breaking, or hard, space. It renders like a normal space " ", but prevents a line wrap from occurring, like this:

Markup Renders as
Lots of text 10&nbsp;kg more text.

It may render like this:

Lots of text 10 kg
more text.

Or it may render like this:

Lots of text
10 kg more text.

But it will not render like this:

Lots of text 10
kg more text.

The non-breaking space works within links exactly like a regular space. Thus you can link to [[J.&nbsp;R.&nbsp;R. Tolkien]] directly and it will render as J. R. R. Tolkien. The initials will not be separated across a line break.

However, &nbsp; renders the source text harder to read and edit. Avoid using it unless it is really necessary to avoid a line break.

Non-breaking hyphen

[edit]

Browsers may break words at hyphens. A non-breaking hyphen &#8209; may be used to prevent this occurring, as in:

As seen on page C&#8209;2 of the newspaper.

This code generates "page C?2" just like the plain code "page C-2", but prevents a line break at the hyphen.

However, like &nbsp;, the use of &#8209; instead of "-" renders the source text harder to read and edit. Don't use it unless it is really necessary to avoid a line break.

Inline blocks

[edit]

The templates {{Inline block}} and {{Avoid wrap}} avoid breaks, but allow them if there is not enough space. {{awrap}} is a shorthand of the latter.

Markup Renders as
{{inline block|{{color|blue|Lorem ipsum
 dolor sit amet, consectetur adipiscing
 elit, sed do eiusmod tempor incididunt.}}}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

{{inline block|{{color|green|Sed ut perspiciatis
 unde omnis iste natus error sit
 voluptatem accusantium.}}}}

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.

{{avoid wrap|{{color|blue|Lorem ipsum
 dolor sit amet, consectetur adipiscing
 elit, sed do eiusmod tempor incididunt.}}}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

{{awrap|{{color|green|Sed ut perspiciatis
 unde omnis iste natus error sit
 voluptatem accusantium.}}}}

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.

Both put the content in <span style="display:inline-block;">. The latter also adds the CSS class "avoidwrap".

{{nowrap}}

[edit]

The {{nowrap}} template is less flexible and will prevent breaks even when the line is too long for the window, forcing the user to scroll:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.

It is good for short text sections like "10 kg (22 lb)", which should always stay together.
This could also be achieved with the non-breaking space: Lots of text 10&nbsp;kg&nbsp;(22&nbsp;lb) more text.
But this makes the source text hard to read. The template is recommended instead: Lots of text {{nowrap|10 kg (22 lb)}} more text.

It may render like this or like this or like this. But not like this.

Lots of text 10 kg (22 lb) more text.

Lots of text 10 kg (22 lb)
more text.

Lots of text
10 kg (22 lb) more text.

Lots of text 10 kg (22
lb) more text.

(For the specific case of unit conversions, see {{convert}}.)

In some cases {{nowrap}} doesn't work so well. For instance, when you want to prevent wraps in longer or more complex text, then it might be hard to see where the {{nowrap}} ends. Additionally, the MediaWiki template mechanisms interpret characters such as equal signs "=" and pipes "|" in template parameters as special characters, and thus they cause problems. In these cases, it is instead recommended to use {{nowrap begin}} + {{nowrap end}}, like this:

{{nowrap begin}}2 + 2 = 4{{nowrap end}} and
{{nowrap begin}}|2| < 3{{nowrap end}}

It may render like this:

2 + 2 = 4 and
|2| < 3

But it will not render like this:

2 + 2 = 4 and |2|
< 3

<wbr> and soft hyphens

[edit]

To insert a word-break opportunity, use <wbr>.

It specifies where it would be OK to add a line-break where a word is too long, or it is perceived that the browser will break a line at the wrong place. Whether the line actually breaks is then left up to the browser. The break will look like a space - see soft hyphen below when it would be more appropriate to break the word or line using a hyphen.

Markup
Now is the time to become a power editor, by learning Hyper<wbr>Text Markup Language...
Renders as
It may render like this:
Now is the time to become a power editor, by learning HyperText Markup Language...

Or it may render like this (in a narrow browser window):

Now is the time to become a power editor, by learning Hyper
Text Markup Language ...

Note that <wbr> will not work inside {{nowrap}}.

In many cases breaking up a word with a space would be inappropriate. Soft hyphens also creates word-break opportunities, but will add a hyphen rather than a space. In other words, a soft hyphen is a hyphen inserted into a word not otherwise hyphenated, to be displayed or typeset only if it falls at the end of a line of text.

The code &shy; is employed in the same manner as <wbr>. For example:

Markup Renders as
This long German word Datenschutz&shy;erkl?rung breaks between its constituent parts "Datenschutz" and "erkl?rung".

This long German word Datenschutz-erkl?rung breaks between its constituent parts "Datenschutz" and "erkl?rung".

Use of soft hyphens should be limited to special cases, usually involving very long words or narrow spaces (such as captions in infoboxes or other tight page layouts, or column labels in narrow tables). Widespread use of soft hyphens is strongly discouraged, because it makes the wikitext very difficult to read and to edit. For example:

Markup Renders as
This Wi&shy;ki&shy;source ex&shy;am&shy;ple is dif&shy;fi&shy;cult to un&shy;der&shy;stand

This Wikisource example is difficult to understand

Consider instead using the {{shy}} template for such complex cases:

Markup Renders as
{{shy|This al|ter|na|tive syn|tax im|proves read|a|bil|ity}}

This alternative syntax improves readability

Wrap between (linked) list items

[edit]

In lists of links such as inside infoboxes and navboxes, use a horizontal list (perhaps via the template {{flatlist}}) to format lists.

For occasional cases where you need to delineate two pieces of text outside of a list, you can use the templates {{·}} or {{?}} which contain a &nbsp; before the dot, thus handling some of the wrapping problems.

See also

[edit]
自汗恶风是什么意思 乳腺结节三级是什么意思 足齐念什么 尿道口有烧灼感为什么 几何图形是什么
玉皇大帝的老婆叫什么 黎民是什么意思 优五行属性是什么 经常呛咳是什么病的征兆 濒死感是什么感觉
11.6号是什么星座 兔子五行属什么 美国为什么不敢动朝鲜 跳蚤长什么样 pn是什么意思
梦见摘枣吃枣是什么意思 便秘灌肠用什么水 梦见乌龟是什么意思 受凉感冒吃什么药 陕西有什么特产
白酒都有什么香型hcv9jop2ns2r.cn 补脑吃什么最好hcv8jop8ns1r.cn 男性手心热是什么原因hcv7jop4ns6r.cn 太阳一晒脸就红是什么原因hcv8jop2ns9r.cn 自带bgm是什么意思hcv9jop0ns3r.cn
突然手发抖是什么原因hcv9jop1ns0r.cn 筒子骨炖什么好吃bjhyzcsm.com 孕妇喝椰子水有什么好处hcv8jop7ns7r.cn 五月二十九是什么日子hcv8jop7ns1r.cn 香蕉是什么季节的水果hcv7jop7ns1r.cn
恶作剧是什么意思hcv9jop1ns2r.cn 灵芝主要治什么病hcv9jop1ns7r.cn 孕妇尿酸高是什么原因hcv7jop9ns4r.cn 含羞草长什么样hcv8jop6ns3r.cn 亲戚是什么意思hcv9jop8ns0r.cn
月经病是什么意思啊hcv9jop2ns7r.cn 四什么八什么的成语hcv8jop4ns5r.cn 帆布是什么材质hcv9jop8ns1r.cn 什么的寒风hcv8jop5ns8r.cn 心慌是什么意思hcv7jop7ns4r.cn
百度