跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
代码酷
搜索
搜索
中文(中国大陆)
外观
创建账号
登录
个人工具
创建账号
登录
未登录编辑者的页面
了解详情
贡献
讨论
编辑“︁
模板:Plainlist/doc
”︁
模板
讨论
大陆简体
阅读
编辑源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
编辑源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
外观
移至侧栏
隐藏
您的更改会在有权核准的用户核准后向读者展示。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> {{Cascade-protected template}} {{High-use}} {{Template shortcut|plist}} {{Uses TemplateStyles|Template:Plainlist/styles.css}} This template provides a [[Web Content Accessibility Guidelines|WCAG]]/ISO-standards-compliant accessible alternative to <code><nowiki><br /></nowiki></code> separated lists, per [[WP:UBLIST]] and [[WP:PLIST]] == Usage == {{tl|plainlist}} starts a plain (i.e. unbulleted) list, such as: {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with {{tag|br|s}}. Detailed reasons for using this template can be found at [[WP:UBLIST]]. This template can be used with or without {{tl|endplainlist}}. It is an alternative to {{tl|unbulleted list}}, which performs the same function in a more concise but less wiki-style manner. Note that {{tl|unbulleted list}} will work inside image captions, whereas {{tl|plainlist}} does not. == Examples == {{Markup |<syntaxhighlight lang="wikitext"> {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} </syntaxhighlight> | {{plainlist| * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] }} }} === Alternative syntax === {{Markup |<syntaxhighlight lang="wikitext"> {{plainlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{endplainlist}} </syntaxhighlight> | {{plainlist}} * [[cat]] * [[dog]] * [[horse]] * [[cow]] * [[sheep]] * [[pig]] {{endplainlist}} }} == Parameters == {{Format TemplateData|JSON= { "params": { "1": { "label": "List content", "description": "If supplied, the list, as a normal bulleted list. (Every line should start with an asterisk. No blank lines between lines.) See template page for how this works otherwise.", "type": "content", "suggested": true }, "class": { "label": "CSS classes", "description": "Adds a CSS class to the containing div.", "type": "string", "default": "The class \"plainlist\" is always applied." }, "style": { "label": "Custom CSS", "description": "Adds CSS style options. Complex styles should not be used in articles (per [[WP:Deviations]]) but may be acceptable on user, project, and talk pages.", "type": "string", "example": "border:solid 1px silver; background:lightyellow" }, "indent": { "label": "Indent level", "description": "Indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.", "type": "number", "example": "2" } }, "description": "This template provides a [[Web Content Accessibility Guidelines|WCAG]]/ISO standards–compliant accessible alternative to <code class=\"nowrap\"><[[HTML element#br|br]] /></code>-separated lists, per [[WP:UBLIST]] and [[WP:PLIST]]. It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with <code class=\"nowrap\"><br /></code>. Detailed reasons for using this template can be found at [[WP:UBLIST]]." } }} === Controlling line-breaking === Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists, to prevent wrapped long entries from being confused with multiple entries. See {{slink|Template:Wbr/doc#Controlling line-breaking in infoboxes}} for details. == Technical details == {{tl|Plainlist}} works by constructing a [[span and div|div]] with the [[Cascading Style Sheets|CSS]] class "plainlist" which has the styles listed in [[Template:Plainlist/styles.css]]. {| class="wikitable" ! Wikitext ! Expanded template ! HTML |- style="vertical-align:top;" | class="nowrap" | <pre> {{Plainlist| * Example 1 * Example 2 * Example 3 }} </pre> | class="nowrap" | {{nowiki2|tag=pre| {{Plainlist| * Example 1 * Example 2 * Example 3 }} }} | <syntaxhighlight lang="html"> <div class="plainlist"> <ul> <li>Example 1</li> <li>Example 2</li> <li>Example 3</li> </ul> </div> </syntaxhighlight> |} == Redirects == * {{Template link|Bulletless list}} * {{Template link|PL}} * {{Template link|Plain list}} * {{tl|Startplainlist}} == See also == * {{tl|unbulleted list}} – essentially the same but uses <code><nowiki>| ... | ... | ...</nowiki></code> instead of <code><nowiki>|* ... * ... * ...</nowiki></code> * {{tl|flatlist}} and {{tl|hlist}} (replacements for comma- or dash-separated lists) * {{tl|bulleted list}} * {{tl|indented plainlist}} * {{tl|ordered list}} * {{section link|Template:Infobox person#Inline lists}} for more information on creating lists within the Infobox family of templates, with examples in the following {{section link|Template:Infobox person#Examples|nopage=y}} {{navbox lists}} <includeonly>{{Sandbox other|| <!-- CATEGORIES HERE, THANKS --> [[Category:List formatting and function templates|Plainlist]] [[Category:Semantic markup templates]] [[Category:Typing-aid templates|Plainlist]] }}</includeonly>
摘要:
请注意,所有对代码酷的贡献均被视为依照知识共享署名-非商业性使用-相同方式共享发表(详情请见
代码酷:著作权
)。如果您不希望您的文字作品被随意编辑和分发传播,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
该页面使用的模板:
模板:!!
(
编辑
)
模板:!-
(
编辑
)
模板:Bulleted list
(
编辑
)
模板:Cascade-protected template
(
编辑
)
模板:Category link
(
编辑
)
模板:Category link/core
(
编辑
)
模板:Cl
(
编辑
)
模板:Columns-list
(
编辑
)
模板:Cslist
(
编辑
)
模板:Cslist/styles.css
(
编辑
)
模板:Defn
(
编辑
)
模板:Div col
(
编辑
)
模板:Div col/styles.css
(
编辑
)
模板:Documentation subpage
(
编辑
)
模板:Endplainlist
(
编辑
)
模板:Flatlist
(
编辑
)
模板:Flowlist
(
编辑
)
模板:Flowlist/styles.css
(
编辑
)
模板:For loop
(
编辑
)
模板:Format TemplateData
(
编辑
)
模板:Format item
(
编辑
)
模板:Glossary
(
编辑
)
模板:Glossary/styles.css
(
编辑
)
模板:Glossary end
(
编辑
)
模板:HTML lists
(
编辑
)
模板:High-use
(
编辑
)
模板:Hlist
(
编辑
)
模板:Hlist/styles.css
(
编辑
)
模板:Ifsubst
(
编辑
)
模板:Item
(
编辑
)
模板:Main other
(
编辑
)
模板:Markup
(
编辑
)
模板:Markup/row
(
编辑
)
模板:Markup/styles.css
(
编辑
)
模板:Mbox
(
编辑
)
模板:Mono
(
编辑
)
模板:Mono/styles.css
(
编辑
)
模板:Navbox bottom
(
编辑
)
模板:Navbox lists
(
编辑
)
模板:Navbox top
(
编辑
)
模板:No redirect
(
编辑
)
模板:Nowiki2
(
编辑
)
模板:Ordered list
(
编辑
)
模板:Plainlist
(
编辑
)
模板:Plainlist/styles.css
(
编辑
)
模板:Sandbox other
(
编辑
)
模板:Section link
(
编辑
)
模板:Slink
(
编辑
)
模板:Strong
(
编辑
)
模板:Tag
(
编辑
)
模板:TemplateData header
(
编辑
)
模板:Template link
(
编辑
)
模板:Template link expanded
(
编辑
)
模板:Template link null
(
编辑
)
模板:Template other
(
编辑
)
模板:Template parameter usage
(
编辑
)
模板:Template shortcut
(
编辑
)
模板:Term
(
编辑
)
模板:Terminate sentence
(
编辑
)
模板:Tl
(
编辑
)
模板:Tlx
(
编辑
)
模板:Tnull
(
编辑
)
模板:Unbulleted list
(
编辑
)
模板:Uses TemplateStyles
(
编辑
)
模板:Yesno
(
编辑
)
模板:Yesno-no
(
编辑
)
模板:Yesno-yes
(
编辑
)
模块:Arguments
(
编辑
)
模块:Check for unknown parameters
(
编辑
)
模块:Cslist
(
编辑
)
模块:Delink
(
编辑
)
模块:For loop
(
编辑
)
模块:Format TemplateData
(
编辑
)
模块:Format TemplateData/config
(
编辑
)
模块:High-use
(
编辑
)
模块:Item
(
编辑
)
模块:List
(
编辑
)
模块:LuaCall
(
编辑
)
模块:Lua call
(
编辑
)
模块:Message box
(
编辑
)
模块:Message box/configuration
(
编辑
)
模块:Message box/ombox.css
(
编辑
)
模块:Multilingual
(
编辑
)
模块:Navbar
(
编辑
)
模块:Navbar/configuration
(
编辑
)
模块:Navbar/styles.css
(
编辑
)
模块:Navbox
(
编辑
)
模块:Navbox/configuration
(
编辑
)
模块:Navbox/styles.css
(
编辑
)
模块:Navbox top and bottom
(
编辑
)
模块:Redirect
(
编辑
)
模块:Section link
(
编辑
)
模块:Shortcut
(
编辑
)
模块:Shortcut/config
(
编辑
)
模块:Shortcut/styles.css
(
编辑
)
模块:String
(
编辑
)
模块:TNT
(
编辑
)
模块:TableTools
(
编辑
)
模块:Template link general
(
编辑
)
模块:Template wrapper
(
编辑
)
模块:Text
(
编辑
)
模块:Transclusion count
(
编辑
)
模块:Transclusion count/data/P
(
编辑
)
模块:Uses TemplateStyles
(
编辑
)
模块:Uses TemplateStyles/config
(
编辑
)
模块:WLink
(
编辑
)
模块:Yesno
(
编辑
)