document updated 9 months ago, on Mar 22, 2024
In HTML, <dfn> is used to mark a word that will be defined.
I personally prefer to use them in a slightly different way, I prefer to use it whenever I have a
"words as words" use:
https://en.wikipedia.org/wiki/Use–mention_distinction
https://en.wikipedia.org/wiki/MOS:WORDSASWORDS
To style these:
/* --==## give a background color to <dfn>s ##==-- */
dfn {background-color: #cfc} /* light green */
a dfn {background-color: #afe} /* light teal */
a:visited dfn {background-color: #ded} /* nearly a light gray, since green + purple is brown or gray*/
a:hover dfn {background-color: inherit}