A self-reference occurs when a statement refers to itself. Reference is possible when there are two logical levels, a level and a meta-level. It is most commonly used in mathematics, philosophy, computer programming, and linguistics. Self-referential statements can lead to paradoxes (but see antinomy for limits on the significance of these).
Self-reference also occurs in literature when an author refers to his or her work in the context of the work itself. Famous examples include Denis Diderot's Jacques the Fatalist and Luigi Pirandello's Six Characters in Search of an Author.