Template:Tag/doc
外观
| 此頁面是Template:Tag的Templatedocumentation。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
| 其他維基媒體旗下計劃中的相似模板 | |
|---|---|
| 維基共享資源 | |
| MediaWiki.org | |
模板介紹
[编辑]本模板可以用代碼格式顯示XML形式的標籤,主要用於討論頁及幫助頁面。
使用方法
[编辑]|1=(必需):HTML標籤名稱|2=:標籤的顯示方式p、pair:(預設)顯示相互對應的開、關標籤,如<font>...</font>- 要隱藏標籤之間的省略號的話,可加入置空的
|content=參數
- 要隱藏標籤之間的省略號的話,可加入置空的
o、open、开、左:只顯示開標籤,如<span>c、close、关、右:只顯示關標籤,如</span>s、single:顯示單項標籤,如<br />
|content=、|3=、|内容=、|文字=:標籤之間的內容|params=、|4=、|参数=:任何置於開標籤內的參數
範例
[编辑]{{tag|ref}}→<ref>...</ref>{{tag|ref|content=}}→<ref></ref>{{tag|ref|content=hello}}→<ref>hello</ref>{{tag|font|content=foo}}→<font>foo</font>{{tag|font|open}}→<font>{{tag|font|open|content=hello}}→<font>hello{{tag|span|close|content=hello}}→hello</span>{{tag|span|pair|content=hello}}→<span>hello</span>{{tag|ref|open|params=group="note"}}→<ref group="note">{{tag|references|single}}→<references />{{tag|br|single}}→<br />
注意事项
[编辑]參見
[编辑]- {{HTMLElement}}
- {{XMLElement}}
- {{xtag}}可顯示MediaWiki解析器或擴展標籤,並連結至該擴展的說明頁面
- #tag:解析器函數可顯示實際生效的標籤