Template:Tag/doc

来自维基学院

Template:Interwikitmp-grp

模板介紹[编辑源代码]

本模板可以用代碼格式顯示XML形式的標籤,主要用於討論頁及幫助頁面。

使用方法[编辑源代码]

  • |1=(必需):HTML標籤名稱
  • |2=:標籤的顯示方式
    • ppair:(預設)顯示相互對應的開、關標籤,如<font>……</font>
      • 要隱藏標籤之間的省略號的話,可加入置空的|content=參數
    • oopen:只顯示開標籤,如<span>
    • cclose:只顯示關標籤,如</span>
    • ssingle:顯示單項標籤,如<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:解析器函數可顯示實際生效的標籤

给模板编辑者的说明[编辑源代码]

模板结构[编辑源代码]

实现方法[编辑源代码]

编辑注意[编辑源代码]