@@ -19,15 +19,18 @@ following lines to `mkdocs.yml`:
1919``` yaml
2020markdown_extensions :
2121 - abbr
22+ - attr_list
2223 - pymdownx.snippets
2324` ` `
2425
2526See additional configuration options:
2627
2728- [Abbreviations]
29+ - [Attribute Lists]
2830- [Snippets]
2931
3032 [Abbreviations]: ../setup/extensions/python-markdown.md#abbreviations
33+ [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists
3134 [Snippets]: ../setup/extensions/python-markdown-extensions.md#snippets
3235
3336### Improved tooltips
@@ -60,9 +63,9 @@ Now, tooltips will be rendered for the following elements:
6063
6164The [Markdown syntax] allows to specify a `title` for each link, which will
6265render as a beautiful tooltip when [improved tooltips] are enabled. Add a
63- tooltip to an link with the following lines :
66+ tooltip to a link with the following lines :
6467
65- ` ` ` markdown title="Link with title , inline syntax"
68+ ` ` ` markdown title="Link with tooltip , inline syntax"
6669[Hover me](https://example.com "I'm a tooltip!")
6770` ` `
6871
@@ -74,7 +77,7 @@ tooltip to an link with the following lines:
7477
7578Tooltips can also be added to link references :
7679
77- ` ` ` markdown title="Link with title , reference syntax"
80+ ` ` ` markdown title="Link with tooltip , reference syntax"
7881[Hover me][example]
7982
8083 [example]: https://example.com "I'm a tooltip!"
@@ -84,6 +87,19 @@ Tooltips can also be added to link references:
8487
8588[Hover me](https://example.com "I'm a tooltip!")
8689
90+ </div>
91+
92+ For all other elements, a `title` can be added by using the [Attribute Lists]
93+ extension :
94+
95+ ` ` ` markdown title="Icon with tooltip"
96+ :material-information-outline:{ title="Important information" }
97+ ` ` `
98+
99+ <div class="result" markdown>
100+
101+ :material-information-outline:{ title="Important information" }
102+
87103</div>
88104
89105 [Markdown syntax] : https://daringfireball.net/projects/markdown/syntax#link
0 commit comments