Tech News, Tech & Coding · Free Online Tools

IT Question Answer
Tools
Back to What Is

What Is a Markup Language? Definition and Examples

What IsMarkup Languages & MarkdownBy Muhammad Fareed
markup-languagehtmlxmlmarkdown

Short answer: a markup language is a system of tags or symbols that annotate text to describe its structure, meaning or presentation. HTML, XML and Markdown are well-known examples. They tell software how to treat content, but they do not run logic like a programming language.

The idea behind markup

Plain text has no structure: a computer cannot tell a heading from a paragraph. Markup adds that information using special notation. In HTML you wrap a heading in tags, and in Markdown you put a hash sign in front of it:

<h1>Chapter One</h1>        <!-- HTML -->
# Chapter One                 <!-- Markdown -->

A browser or other program reads the markup and decides how to display or process the content.

Common markup languages

LanguageMain use
HTMLStructure of web pages
XMLStoring and exchanging structured data
XHTMLHTML rewritten with strict XML rules
MarkdownSimple formatting for documentation, notes and posts
SVGVector graphics written in XML
LaTeXTypesetting scientific and technical documents

Elements, tags and attributes

Tag-based languages share a few parts:

  • Tags: labels in angle brackets, such as <p> and </p>.
  • Elements: a start tag, content and an end tag together.
  • Attributes: extra information inside a start tag, such as href="https://example.com".
  • Nesting: elements placed inside other elements to form a tree.

Presentational and descriptive markup

Early markup mixed content with look and feel, for example "make this bold". Modern practice separates them: markup describes what content is (a heading, a list, an address), and a stylesheet such as CSS controls how it looks. This separation makes content easier to reuse, search and make accessible.

Markup vs programming languages

Programming languages describe steps and decisions, with variables, conditions and loops. Markup languages describe structure and meaning. They often work together: HTML gives a page structure, CSS styles it and JavaScript adds behavior.

A short history

Markup began with typesetters who annotated manuscripts to tell printers how to set text. Computer markup followed with systems such as GML and SGML, a standard for defining document formats. HTML, created for the web in the early 1990s, used SGML ideas in a simple form, and XML later reduced SGML into a flexible format for data. Markdown appeared in 2004 as a readable way to write HTML.

Why markup still matters

Almost everything you read online starts as markup. Clear structure helps browsers display pages, screen readers announce content, search engines understand topics and programs exchange data. Learning markup is the first step in web development and a useful skill for writers and analysts.

Frequently asked questions

What does the "ML" in HTML and XML stand for?

It stands for markup language. HTML is HyperText Markup Language and XML is Extensible Markup Language.

Is JSON a markup language?

No. JSON is a data format. It stores structured data but does not annotate text with tags to describe document structure.

Which markup language should I learn first?

HTML, because it is the foundation of web pages. Markdown is also quick to learn and useful for documentation and notes.