Jules Vernes' 20,000 Leagues Under the Sea is considered an example of the "science fiction" or "hard science" genre of the more general category of "speculative fiction".
Traditional literary fiction is often divided into fiction of plot, in which most of the reader's interest is in the action (e.g. mystery novels, sensation novels, gothic novels), and novel of character, or psychological novel, in which the main focus of the story is the inner transformations or nature of one or more characters (e.g. Virginia Wolfe, Henry James, etc) Speculative fiction, on the other hand, is defined by setting.
In speculative fiction, some key element of the fictional world differs from the one we know. It may be based on counterfactual history (the Trojans or Persians conquering Greece) or set in an imagined future. Sometimes, in `hard`or `pure`science fiction of which Verne is an example, the new element of the setting is a new technology.