肾轻度积水是什么意思| 类风湿挂什么科室| 总胆汁酸高吃什么药| 午睡睡不着是什么原因| 王玉读什么| 一面什么| 乙酉是什么意思| zw是什么意思| 鱼不能和什么食物一起吃| 悠闲惬意什么意思| 侮辱什么意思| 静脉曲张用什么药| 中药木香的功效与作用是什么| 牛鬼蛇神指什么生肖| 1923年属什么生肖| 狗狗呕吐吃什么药| 什么虎什么山| 例假推迟是什么原因引起的| 哥们是什么意思| 猪属什么五行| 喝完酒吃什么解酒最快| 心肌病吃什么药| 胃病可以吃什么水果| 牛和什么生肖相冲| 背靠背是什么牌子| 追随是什么意思| 四肢冰凉是什么原因| 什么是个性| 叶公好龙讽刺了什么| 拉肚子低烧是什么原因| 女人胸疼是什么原因| 牛头人是什么意思| 生茶和熟茶有什么区别| 五十是什么之年| 兰花长什么样| 上海最高楼叫什么大厦有多少米高| 新生儿血糖低是什么原因| 白洞是什么东西| 戏子是什么意思| 百合什么时候种植最好| 市监狱长是什么级别| 砥砺什么意思| 左小腹疼是什么原因| 膀胱充盈欠佳什么意思| 什么叫副乳| 癔症是什么病| 生理盐水有什么作用| 润肺吃什么| 双侧乳腺结构不良什么意思| 副省长是什么级别| 急救物品五定是什么| 2017属什么| 小三阳是什么| 什么东西清肺止咳| 耳轮有痣代表什么| 吃什么食物可以降尿酸| au是什么金属| 压榨是什么意思| 指甲小月牙代表什么| 无花果什么功效| 磊字五行属什么| 89年是什么命| 闪光点是什么意思| 美国为什么要打伊朗| 才子是什么生肖| 下肢静脉曲张挂什么科| kolumb是什么牌子| 务农是什么意思| 屎忽鬼是什么意思| 未见明显胚芽是什么意思| 参谋是什么军衔| 小腹左侧疼是什么原因| 臣附议是什么意思| 致爱是什么意思| 雾化治疗的作用是什么| 4.26是什么星座| 什么茶女人长期喝最好| 淋巴肿瘤吃什么食物好| 图谋不轨什么意思| 猪蹄和什么一起炖好吃| 父母有刑是什么意思| 黄瓜有什么功效| pa是什么材质| 02年是什么年| 农历是什么生肖| 冰心原名叫什么名字| 前列腺钙化是什么病| 一直放屁什么原因| 嗪读什么| 为伊消得人憔悴什么意思| 梦见捡硬币是什么预兆| 卡宾男装属于什么档次| 早上起来眼皮肿是什么原因| 貂蝉姓什么| 观音菩萨成道日是什么意思| 围魏救赵是什么意思| 什么水能喝| 肠胃炎挂什么科| 曼珠沙华是什么意思| 上面日下面立读什么| 急性肠胃炎吃什么药| 19岁属什么生肖| 外阴湿疹用什么药| 屁股痛挂什么科| 凭什么| 十一月份什么星座| 女性内分泌失调吃什么药| b超回声不均匀是什么意思| 白细胞低吃什么药| 老人嗜睡是什么原因| 又什么又什么的花| 月经提前来是什么原因| 杜甫自号什么| 巴旦木和杏仁有什么区别| 人湿气重有什么症状| 嫦娥奔月是什么节日| ca125检查是什么意思| 梦见耗子是什么预兆| 七月三号是什么日子| 为什么手上会起小水泡| gn是什么意思| 风寒感冒吃什么药最快| 什么的骏马| 白色车里放什么摆件好| 策反是什么意思| 什么是关税| 菜园里有什么菜| 长期吃阿司匹林有什么副作用| 麦克白夫人什么意思| 疡是什么意思| 水浒传什么朝代| 牙龈翻瓣术是什么意思| 讽刺是什么意思| 呼吸性碱中毒吃什么药| 口比念什么| 婴儿老是放屁是什么原因| 胃动力不足吃什么药| 做腋臭手术挂什么科室| 鼻窦炎有什么症状| 脸上有痣去医院挂什么科| 大脑供血不足头晕吃什么药最好| 军魂是什么意思| 青帝是什么意思| 坐卧针毡是什么生肖| 女人三十如狼四十如虎什么意思| 狗可以吃什么| 臀疗是什么| 流产后不能吃什么东西| 9月3号什么日子| 什么的麦田| 陕西为什么叫三秦大地| 经常催吐有什么危害| 什么是非处方药| 催乳素过高会有什么严重的后果| 巴基斯坦讲什么语言| 被cue是什么意思| 怀孕初期不能吃什么| 驻马店以前叫什么名字| 晟是什么字| 喝藏红花有什么好处| 气滞血瘀吃什么中成药| 什么的莲蓬| 脾大有什么危害| 佛是什么生肖| 什么的黎明| hpv什么意思| 中性是什么意思| 不知道叫什么名字好| 鼻子两侧毛孔粗大是什么原因造成的| 晞是什么意思| 主动脉硬化是什么意思| 勉强是什么意思| 常喝苦荞茶有什么好处| 画龙点睛是什么生肖| 棉麻是什么面料| 老人头晕挂什么科| 息肌丸是什么| 心律失常是什么意思| 罗字五行属什么| 胎儿窘迫什么意思| 拔牙能吃什么| 什么动物吃猫| 控诉是什么意思| 1964属什么生肖| 什么的枝干| 掉头发是什么原因导致的| 甲鱼和乌龟有什么区别| 3.5是什么星座| 葛根长什么样子图片| 右眼皮跳有什么预兆| dsa是什么| 女人肚子大是什么原因| bobby什么意思| 烤肉筋的肉是什么肉| 黄麻是什么| 突然勃不起来是什么原因造成的| 三月十九是什么星座| 果粉是什么意思| 人工流产后可以吃什么| 备孕要吃什么| 1314代表什么意思| 11月15日出生是什么星座| 低血压高吃什么药| 419是什么意思| 脸上长粉刺是什么原因引起的| 流脑是什么病| 得性病有什么症状| 微量蛋白尿高说明什么| 吃榴莲对身体有什么好处| 斑点狗是什么品种| 双子座爱吃什么| 尿检潜血是什么意思| 1948年属什么生肖| 临床医学是什么意思| psv医学是什么意思| 剑齿虎为什么会灭绝| 雌二醇e2是什么意思| 小便尿血是什么原因| 天津副市长什么级别| 农历六月初三是什么星座| 涂素颜霜之前要涂什么| 吃什么能美白| 胃口疼是什么原因| loves是什么意思| 老人身上痒是什么原因| 什么水果最甜| eyki是什么牌子的手表| 8月是什么季节| 养胃吃什么最好| 好巴适是什么意思| 龙井是什么茶| 面粉和淀粉有什么区别| 女性胃火旺吃什么药| 段子是什么意思| 血糖高什么原因| 深覆合是什么样子的| 意外是什么意思| 为什么没人穿卡帕| 香仪是什么意思| 人活着为了什么| 牛油果不能和什么一起吃| 念力是什么意思| 眼睛不舒服是什么原因引起的| 彩虹什么颜色| 甲醇对人体有什么伤害| 血液属于什么组织| 12.24是什么星座| 类风湿吃什么食物好| 物是人非是什么意思| 无后为大是什么意思| 血脂高胆固醇高吃什么好| 脱肛和痔疮有什么区别| 骨折移位有什么感觉| 电销是什么| 积德是什么意思| 遗憾是什么| 干咳嗓子痒吃什么药| 什么动物吃猫| 蜱虫长什么样| 文武双全是什么意思| 为什么不能叫醒梦游的人| 一览无余是什么意思| 不置可否什么意思| 痤疮是由什么引起的| 百度Jump to content

2017医药电商app推荐 能在网上买药的app有哪些

This page is semi-protected.
From Wikibooks, open books for an open world

A table is an arrangement of columns and rows used to organize and position data. Tables are useful for this purpose and there are many different styles and tricks that can be used to customize each. This page gives you information about syntax to build tables in Wikibooks.

Using the toolbar

Vector toolbar

To automatically insert a table, click (Insert a table) on the edit toolbar.

The following text is inserted when the button is clicked and the default values are accepted:

{| class="wikitable"
|-
! Header text !! Header text !! Header text
|-
| Example || Example || Example
|-
| Example || Example || Example
|-
| Example || Example || Example
|}
Header text Header text Header text
Example Example Example
Example Example Example
Example Example Example

The sample text ("Header text" or "Example") is to be replaced with actual data. The number of columns and rows can be customized when working with the initial dialog box that appears after clicking the "insert table" button.

Syntax tutorial

Wiki Table Markup
{| table start
 |+ table caption, optional; only between table start and first table row
 |- table row, optional on first row -- wiki engine assumes the first row
 ! table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
 | table data cell, required! Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
 |} table end
The above marks must start on a new line except the double || and !! for optionally adding consecutive cells to a line.
Comparison of table markup
WIKI XHTML
{| [attr] <table [attr]>
 |+ caption <caption>caption</caption>
 |+ [attr] | caption <caption [attr]>caption</caption>
 |- [attr] <tr [attr]></tr>
 ! header <th>header</th>
 ! attr | header <th [attr]>header</th>
 ! header !! header <th>header</th>
<th>header</th>
 ! [attr] | header !! header <th [attr]>header</th>
<th [attr]>header</th>
 | data cell <td>data cell</td>
 | [attr] | data cell <td [attr]>data cell</td>
 | data || data <td>data</td>
<td>data</td>
 | [attr] | data || data <td [attr]>data</td>
<td [attr]>data</td>
 |} </table>

If you use single bars, then what might appear to be the first cell is in fact a format modifier applied to the cell, and the rest of your "cells" will be merged into one:

{| style="border:1px;"
|-
|format modifier (not displayed) |These all  |(including the pipes) |go into  |the first cell
|}

which is probably not what you want:

These all |(including the pipes)|go into |the first cell

However, the format modifier is useful:

{| style="border:1px;"
|-
| Cell 1 (no modifier—not aligned)
|-
| style="text-align: right;" | Cell 2 (right aligned)
|}
Cell 1 (no modifier — not aligned)
Cell 2 (right aligned)

Just remember: no more than 2 single pipes on a line!

A row of column headings is identified by using "! scope="col" |" instead of "|", and using "!! scope="col" |" instead of "||". Header cells typically render differently from regular cells, depending on the browser. They are often rendered in a bold font and centered.

{|
|+ The table's caption
! scope="col" | Column heading 1 
! scope="col" | Column heading 2 
! scope="col" | Column heading 3
|-
| Cell 1 || Cell 2 || Cell 3
|-
| Cell A
| Cell B
| Cell C
|}

The first cell of a row is identified as a row heading by starting the line with "! scope="row" |" instead of "|", and starting subsequent data cells on a new line.

{|
|+ The table's caption
! scope="col" | Column heading 1 
! scope="col" | Column heading 2 
! scope="col" | Column heading 3
|-
! scope="row" | Row heading 1
| Cell 2 || Cell 3
|-
! scope="row" | Row heading A
| Cell B
| Cell C
|}

Optional parameters can modify the behavior of cells, rows, or the entire table. For instance, a border could be added to the table:

{| border="1"
|+ The table's caption
! scope="col" | Column heading 1 
! scope="col" | Column heading 2 
! scope="col" | Column heading 3
|-
! scope="row" | Row heading 1
| Cell 2 || Cell 3
|-
! scope="row" | Row heading A
| Cell B
| Cell C
|}

The final table would display like this:

The table's caption
Column heading 1 Column heading 2 Column heading 3
Row heading 1 Cell 2 Cell 3
Row heading A Cell B Cell C

Each row must have the same number of cells as the other rows, so that the number of columns in the table remains consistent. For empty cells, use the non-breaking space &nbsp; as content to ensure that the cells are displayed. To show a visible pipe in a cell, use <nowiki>|</nowiki> or &#124;.

Simple example

Both of these generate the same output. Choose a style based on the number of cells in each row and the total text inside each cell.

The wiki markup code:

{|
| A
| B
|-
| C
| D
|}
{|
| A || B
|-
| C || D
|}

What it looks like in your browser:

A B
C D

Standard formatting

You can add class="wikitable" next to the {| at the start of your table to have the standard formatting applied that applies a background color to table headings and adds borders between cells and around the table.

{| class="wikitable" style="text-align: center; width: 200px; height: 200px;"
|+ Multiplication table
|-
! scope="col" | × 
! scope="col" | 1 
! scope="col" | 2 
! scope="col" | 3
|-
! scope="row" | 1
| 1 || 2 || 3
|-
! scope="row" | 2
| 2 || 4 || 6
|-
! scope="row" | 3
| 3 || 6 || 9
|-
! scope="row" | 4
| 4 || 8 || 12
|-
! scope="row" | 5
| 5 || 10 || 15
|}

and what it looks like in your browser:

Multiplication table
× 1 2 3
1 1 2 3
2 2 4 6
3 3 6 9
4 4 8 12
5 5 10 15

Color

The way of specifying color of text and background for a single cell are as follows.

The wiki markup code:

{|
| style="background: red; color: white" | abc
| def
| style="background: red; color: white" | ghi
| jkl
|}

What it looks like in your browser:

abc def ghi jkl

Like other parameters, colors can also be specified for a whole row or the whole table; parameters for a row override the value for the table, and those for a cell override those for a row. (Note that there is no easy way to specify a color for a whole column—each cell in the column must be individually specified.):

The wiki markup code:

{| style="background: yellow; color: green"
|-
| abc || def || ghi
|- style="background: red; color: white"
| jkl || mno || pqr
|-
| stu || style="background: silver" | vwx || yz
|}

What it looks like in your browser:

abc def ghi
jkl mno pqr
stu vwx yz

To make the table blend in with the background, use style="background: none;" or style="background: transparent;".

To force a cell to match one of the default colors of the class="wikitable", use style="background: #f2f2f2" for the darker header, and style="background: #f9f9f9" for the lighter body.

Width, height

The width and height of the whole table can be specified, as well as the height of a row. To specify the width of a column one can specify the width of an arbitrary cell in it. If the width is not specified for all columns, and/or the height is not specified for all rows, then there is some ambiguity, and the result depends on the browser.

The wiki markup code:

{| style="width: 75%; height: 200px;" class="wikitable"
|-
| abc || def || ghi
|- style="height:100px;"
| jkl || style="width:200px;" | mno || pqr
|-
| stu || vwx || yz
|}

What it looks like in your browser:

abc def ghi
jkl mno pqr
stu vwx yz

Setting column widths

To force column widths to specific requirements, rather than accepting the width of the widest text element in a column's cells, follow this example. Note that wrap-around of text is forced.

The wiki markup code:

{| class="wikitable"
! scope="col" style="width:50px;" | Name
! scope="col" style="width:225px;" | Effect
! scope="col" style="width:225px;" | Games Found In
|-
| Poké Ball || Regular Poké Ball || All Versions
|-
| Great Ball || Better than a Poké Ball || All Versions
|}
Name Effect Games Found In
Poké Ball Regular Poké Ball All Versions
Great Ball Better than a Poké Ball All Versions

To set column widths in a table without headers, specify the width in the first cell for each column, like this:

{| class="wikitable"
|-
| style="width:100px;" | This column is 100 pixels wide
| style="width:200px;" | This column is 200 pixels  wide
| style="width:300px;" | This column is 300 pixels wide
|-
| blah || blih || bluh
|}
This column is 100 pixels wide This column is 200 pixels wide This column is 300 pixels wide
blah blih bluh

Setting borders

Table borders default to a complex shaded double-line (the default in HTML); however, those borders can be set to a thin solid line by using a style-parameter (style="border: 1px solid darkgray"), as in the following (Note: if you intend to use the 'cellpadding' or 'cellspacing' options along with a border, you MUST use this format):

{| cellpadding="2" style="border: 1px solid darkgray;"
! style="width: 140px;" | Left
! style="width: 150px;" | Middle
! style="width: 130px;" | Right
|- style="border:none;"
| [[File:StarIconBronze.png|120px]]
| [[File:StarIconGold.png|120px|Caption when mouse-over image]]
| [[File:StarIconGreen.png|120px|Green stellar icon]]
|- style="text-align:center;"
| Bronze star || Gold star || Green star
|}

Note the bottom-row texts are centered by style="text-align: center;" while star-images were not centered.

Left Middle Right
Caption when mouse-over image Green stellar icon
Bronze star Gold star Green star

As long as the files omit the parameter "thumb" they will not show borders. The border color "darkgray" matches that seen using class="wikitable" above; however, it could be any color name (such as style="border: 1px solid darkgreen;") or use a hex-color (such as: #DDCCBB). See Web colors for information on hex-colors, which allow you to specify any shade you like.

A column format-specifier (enclosed in "|...|") can have a style-parameter to set borders on each cell, as follows:

{| cellpadding="2" style="border: 1px solid darkgray;"
! style="width: 140px;" | Left
! style="width: 150px;" | Middle
! style="width: 130px;"| Right
|- style="text-align: center;"
| style="border: 1px solid blue;"|
[[File:StarIconBronze.png|120px]]
| style="border: 1px solid #777777;"|
[[File:StarIconGold.png|120px|Caption when mouse-over image]]
| style="border: 1px solid #22AA55;"|
[[File:StarIconGreen.png|120px|Green stellar icon]]
|- style="text-align: center;"
|Bronze star || Gold star || Green star
|}

Note only the image cells, here, have individual borders, not the text.

Left Middle Right

Caption when mouse-over image

Green stellar icon

Bronze star Gold star Green star

The lower hex-colors (such as: #616161) are closer to black. Typically, all borders in a table would be one specific color.

Vertical alignment

By default data in tables is vertically aligned to the middle of the cell, which results in layouts like this:

Row heading A longer piece of text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. short text

To fix this, apply style="vertical-align: top;" to the rows (unfortunately it is necessary to apply this individually to every single row). For example:

{| class="wikitable" style="width: 400px;"
|- style="vertical-align: top;"
! scope="row" style="width: 10%;" | Row heading
| style="width: 70%;" | A longer piece of text. Lorem ipsum...
| style="width: 20%;" | short text
|- style="vertical-align: top"
! scope="row" | Row heading
| Excepteur sint occaecat...
| short text
|}
Row heading A longer piece of text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. short text

Floating table

The wiki markup coding:

This paragraph is before the table.  Lorem ipsum dolor sit
amet, consectetur adipisicing elit, sed do eiusmod...

{| style="float: right;" class="wikitable"
| Col 1, row 1
| rowspan="2" | Col 2, row 1 (and 2)
| Col 3, row 1
|-
| Col 1, row 2
| Col 3, row 2
|}

Note the floating-table to the right.

This paragraph is after the table.  The text in column 2
will span both rows due to format specifier <tt>"rowspan=2"</tt> so there
is no coding for "Col 2" in the 2nd row, just: Col 1 & Col 3.

What it looks like in your browser:

This paragraph is before the table. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod...

Col 1, row 1 Col 2, row 1 (and 2) Col 3, row 1
Col 1, row 2 Col 3, row 2

Note the floating-table to the right.

This paragraph is after the table. The text in column 2 will span both rows due to format specifier "rowspan=2" so there is no coding for "Col 2" in the 2nd row, just: Col 1 & Col 3.

Centering tables

Centered tables can be achieved, but they will not "float"; that is to say, no text will appear to either side. The trick is {| style="margin: 1em auto 1em auto;"

Wiki markup

{| class="wikitable" style="margin: 1em auto 1em auto;"
|+ '''Cells left-aligned, table centered'''
! scope="col" | Duis 
! scope="col" | aute 
! scope="col" | irure
|-
| dolor  || in reprehenderit || in voluptate velit
|-
| esse cillum dolore || eu fugiat nulla || pariatur.
|}

What it looks like in your browser

Cells left-aligned, table centered
Duis aute irure
dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.

Collapsible tables

You can create a table that will collapse and be hidden. Add class="collapsible" to the top of a table or add "collapsible" after "wikitable" to enable collapsing behavior. By default, a collapsible table will begin collapsed. To change this, include the additional class 'selected'. You must include a header row, where the control to expand and collapse will be displayed. Example:

{| class="wikitable collapsible selected"
! Header
|-
| Content which starts shown
|-
| Click the header row to collapse
|}

Gives:

Header
Content which starts shown
Click the header row to collapse

Sortable tables

Tables can be made sortable by adding class="sortable". Since this can be very useful, it is wise to keep the possibilities and limitations of this feature in mind when designing a table. For example:

  • Do not divide a table into sections by subheaders spanning several rows. Instead, an extra column can be made showing the content of these headers on each row, in a short form.
  • Do not have elements spanning several columns; instead, again, repeat the content on each row, in a short form.
  • In a column of numbers, do not put text such as "ca." in front of a number-it will sort like zero. Do not put text after the number, and do not put a range of numbers. Instead, put these texts in a separate column.

A long form of abbreviated content can be put as legend outside the table.

Wiki markup

{| class="wikitable sortable"
|+ Sortable table
|-
! scope="col" | Alphabetic
! scope="col" | Numeric
! scope="col" | Date
! scope="col" class="unsortable" | Unsortable
|-
| d || 20 || 2025-08-07 || This
|-
| b || 8 || 2025-08-07 || column
|-
| a || 6 || 2025-08-07 || cannot
|-
| c || 4 || 2025-08-07 || be
|-
| e || 0 || 2025-08-07 || sorted.
|}

What it looks like in your browser

Sortable table
Alphabetic Numeric Date Unsortable
d 20 2025-08-07 This
b 8 2025-08-07 column
a 6 2025-08-07 cannot
c 4 2025-08-07 be
e 0 2025-08-07 sorted.


national是什么牌子 淋巴结肿大吃什么药 耐药是什么意思 乙肝是什么意思 劳您费心了什么意思
穿堂风是什么意思 高什么远瞩 维生素b有什么用 女属蛇的和什么属相最配 买手店是什么意思
左心房增大是什么原因 鸽子是什么生肖 农历十月初五是什么星座 岔气吃什么药 脾胃虚弱吃什么水果
小便黄吃什么药 右手臂酸痛是什么前兆 胃酸吃什么好 即使什么也什么造句 小狗什么时候断奶
s和m是什么意思96micro.com 双肾结晶是什么意思hcv8jop5ns7r.cn 红参和高丽参有什么区别hcv8jop1ns6r.cn 不满是什么意思hcv8jop2ns3r.cn 初心是什么xscnpatent.com
王大锤真名叫什么hcv9jop1ns9r.cn 高血糖吃什么水果hcv9jop1ns4r.cn 竹棉和纯棉有什么区别hcv9jop0ns8r.cn 梅毒通过什么传播wuhaiwuya.com 蝎子长什么样aiwuzhiyu.com
什么相接hcv8jop1ns5r.cn 多种维生素什么牌子的效果最好cj623037.com 试管都有什么方案xinjiangjialails.com zn是什么意思aiwuzhiyu.com 二个月不来月经是什么原因hcv7jop7ns3r.cn
大便不成形吃什么药hcv7jop9ns6r.cn 幽门螺旋杆菌用什么药hcv9jop6ns0r.cn 什么降压药副作用小且效果最好imcecn.com 锦鲤是什么意思kuyehao.com 肾阴阳两虚用什么药hcv9jop1ns6r.cn
百度