模板:Tag/doc
外觀
| 此頁面是Template:Tag的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
| 其他維基媒體旗下計劃中的相似模板 | |
|---|---|
| 維基共享資源 | |
| 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:解析器函數可顯示實際生效的標籤