What is it called when a word is used to refer to the word, not its meaning?

In this picture

of a riddle that abuses grammar.

The word 'yet' is being used as a noun, but 'yet' is a conjunction. Is there a term for this?

Transcript of the relevant part of this image, just in case it gets taken down:

What is a word made up of 4 letters, yet is made up of 3. Although is written with 8 letters, and then with 4. Rarely consists of 6, and never is written with 5.


Solution 1:

The term for referring to a word in a sentence instead of actually using the word is "use-mention distinction." In standard English it is normal to offset the mentioned word in some way (here on ELU, and in many other places, we prefer italics, but quotes are common as well); so if you want to make the sentence proper you might write

What is a word made up of 4 letters, yet is made up of 3. Although is written with 8 letters, and then with 4. Rarely consists of 6, and never is written with 5.

Solution 2:

The Chicago Manual of Style, sixteenth edition (2010) uses the rather odd phrase "word used as [a] word" to describe such instances:

7.58 Words and phrases used as words. When a word or term is not used functionally but is referred to as the word or term itself, it is either italicized or enclosed on quotation marks.

The Associated Press Stylebook (2002) uses the similar phrase "words as words":

words as words The meaning of this phrase, which appears occasionally in this book and similar manuals that deal with words, is best illustrated by an example: In this sentence, woman appears solely as a word rather than as the means of representing the concept normally associated with the word.

In mainstream U.S. publishing, "word used as [a] word" has become the standard way to refer to usage of this type.