Guide/italics

From HTML WG Wiki
Jump to: navigation, search

Italics in HTML

Examples from Wikipedia italics page These examples — particularly class names — are for illustrative purposes only, demonstrating markup that could be used.

  • use <em> for Emphasis: "Smith wasn't the only guilty party, it's true."
  • use <cite> for the titles of works that stand by themselves, such as books or newspapers: "There was a performance of Beethoven's Ode to Joy." Works that appear within larger works, such as short stories, poems, or newspaper articles, are not italicized, but merely set off in quotation marks.
  • use <i class="ship"> for the names of ships: "The Queen Mary sailed last night."
  • use <cite> for the title of an epic poem: "The Iliad is thought to be the first Greek writing."
  • use <i lang="fr"> or <dfn lang="la"> for foreign words, including the Latin binary nomenclature in the taxonomy of living organisms: "A splendid coq au vin was served"; "Homo sapiens".
  • use <i> when using a word as an example of a word rather than for its semantic content (see use-mention distinction): "The word the is an article."
  • use <i> for using a letter or number mentioned as itself:
    • John was annoyed: they had forgotten the h in his name once again.
    • When she saw her name beside the 1 on the rankings, she finally had proof that she was the best.
  • use <dfn> when introducing or defining terms, especially technical terms or those used in an unusual or different way:[1] "Freudian psychology is based on the ego, the super-ego, and the id."; "An even number is one that is a multiple of 2."
  • use <i class="thought"> to indicate a character's thought process: "This can't be happening, thought Mary."
  • use MathML or <var> for symbols for physical quantities and other mathematical variables: "The speed of light, c, is approximately equal to 3.00×108 m s-1."