跳转到内容

模板:Span title

维基文库,自由的图书馆

{{{2}}}

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]


This template creates an HTML span element with a title attribute, which is rendered by many user-agents as producing a tooltip when hovered over with a cursor.

{{span title|This is the title|This is the text}}

产生的代码:

<span title="This is the title">This is the text</span>

并呈现为:

This is the text

使用模板比在页面中使用原始HTML稍微整洁。