Markup Languages

When you use a highlighter to mark a word in a textbook, you are marking it up. If you create a system where different color highlights indicate different types of information, you will have created a markup language.

In the context of the internet and computers, a markup language is a system for marking up or annotating a digital document so that the information it it can be structured for more easy access and manipulation.

highlighted text and markup code

Markup Languages

Standard Generalized Markup language

SGML is a standard for defining a markup language and specifying tag sets. SGML is not itself a markup langauge. HTML and XML are based on SGML. The latest version of HTML5 however is no longer based on SGML syntax despite the similarity.

Markup Languages

HTML

HTML is the language used for creating web pages and web applications. HTML has a specified tag set for semantically describing the structure of a web page. HTML elements are the building blocks of a web page and are defined by tags written using angle brackets.

various html tags

A tag consists of an element name written between a left angle bracket and right angle bracket.

html tag parts

Most html elements have an opening and closing tag with content in between. The closing tag is identical to an opening tag except for a forward slash before the element name.

opening and closing p tags

HTML elements can have attributes that hold more information for the element. Attributes are written inside the opening element html tag and their values are written between double or single quotation marks, preceded by an equal sign.

img with src attribute of image1.jpg

Markup Languages

XML, XHTML, and HTML5

XML is a human and machine readable markup language for storing and transporting data. It looks very similar to HTML, having opening and closing tags with attributes, but the tags are user defined. Developers can create any tag they need to describe information. All xml documents must have a root element. XML is not a replacement or alternative to HTML.

XHTML is an evolution of HTML with the formatting strengths of HTML 4.01 and the structure and extensibility strengths of XML. The syntax for XHTML is more strict than that of HTML. XHTML has now been replaced by HTML5.

HTML5 is the latest standard markup language for the web. It incorporates features of it's predecessors and adds new elements, provides new features, and is backward compatible.