A “markup language” is a system for annotating a document in a way that is syntactically distinguishable from the text. The primary purpose of a markup language is to define and describe elements within a document, and these definitions are usually intended to instruct software how to display and interact with the document’s content. Here are specific characteristics that delineate a language as being a markup language:

  1. Tag-based Syntax: Most markup languages use a system of tags to denote elements in a document. These tags generally come in pairs (a start tag and an end tag), and they surround content to apply formatting or to define the structure. For example, in HTML, <p> and </p> are used to denote a paragraph.

  2. Separation of Content and Presentation: Markup languages typically focus on defining the structure and content of a document, leaving presentation details (like fonts or colors) to be defined elsewhere (e.g., CSS in the case of HTML). This separation allows the same markup document to be displayed in different styles or presented in different environments.

  3. Human-readable and Machine-readable: Markup languages are designed to be easy for humans to read and write, and also easy for machines to parse and generate. The syntax is generally clear and indicative of the structure of the document.

  4. Descriptive, not Procedural: Markup languages are descriptive; they describe what something is rather than how it should be processed. This is in contrast to programming languages, which provide detailed commands and procedures to the computer.

  5. Extensibility: Many markup languages allow for the definition of new tags and attributes. This extensibility lets users and developers customize the language to suit specific needs, particularly for specialized fields of use.

Examples:

  • HTML (HyperText Markup Language): Used to structure content on the web.
  • XML (eXtensible Markup Language): A flexible language designed to store and transport data, with a focus on simplicity and usability over the Internet.
  • Markdown: A lightweight markup language with plain text formatting syntax, designed so that it can be converted to HTML and many other formats.

These characteristics define the core essence of markup languages, setting them apart from other types of languages like programming languages, scripting languages, or style sheet languages.