Markup Language

From Seobility Wiki
Jump to: navigation, search

Definition

Markup Language
Figure: Markup Language - Author: Seobility - License: CC BY-SA 4.0

Markup language is a term used in computer text processing to refer to an organized annotation system (i.e. language) that marks certain parts or elements of a document as different from plain text. Essentially, markup language is used in web documents or applications to format text and to give it a specific structure. Another basic characteristic is that markup language is invisible to the reader of a web page or document since the only way to view it is by accessing the source code. Unlike programming languages, markup languages are not executed: they are read and rendered instead.

How it works

In order to format or structure a page, markup language uses a series of tags, often enclosed in angle brackets, whose symbol is <>. These tags function like instructions, and enclosing them in angle brackets makes the tags syntactically different from plain text. Markup tags are read and interpreted by parsers, which then generate output, usually as a page or document that is formatted and styled accordingly while keeping the actual markup hidden from plain sight.

For example, in HTML markup language, the h1 tag indicates a web page’s main header element and these tags instruct the machine to render the header in bolder or larger font, as per the standard HTML conventions. However, a reader browsing this page would only see the formatted header, instead of the markup tags.

Descriptive markup languages vs. procedural markup languages

There are several markup languages available to web developers, and it is possible to use different types of markup languages in the same document. Broadly speaking, they can be classified into two groups depending on their main function: descriptive and procedural languages.

Descriptive markup languages

As their name suggests, the function of descriptive markup languages is to describe or label elements or sections of a web document. This language is purely semantic, which means that it does not give any instructions on how it must be processed. Instead, the focus of descriptive markup is to label parts of a document along conceptually established areas.

HTML and XML are some of the most widely used descriptive markup systems. XML stands for Extensible Markup Language that was developed in the 1970s in order to simplify the existing web document annotation systems. XML markup differs from HTML in that its applications go beyond the display of web documents. XML has been used to support a range of applications, from productivity to communication tools.

On the other hand, HTML stands for Hypertext Markup Language and appeared in the early 1990s. Over the following decades, it became the most commonly used markup system in the world wide web. Common uses include creating web page sections and divisions, and formatting lists, text, and contact forms. A basic HTML document would look as follows:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
</head>
<body>
<h1>Main Heading</h1>
<p>Sample paragraph</p>
<h2>Sample Sub-heading</h2>
<p>Sample paragraph</p>
<img src="image-file-name" alt="image title">
</body>
</html>

In the document above, HTML markup would tell the browser how to format and display elements like title, main heading, and sub-heading, all according to default parameters unless otherwise specified by CSS.

Procedural markup languages

Unlike descriptive markup systems, procedural languages do offer instructions on how their tags should be processed. These systems are used in a variety of applications, from desktop publishing to typesetting and word processing. Some examples of the most commonly used procedural languages include Postscript and LaTex.

LaTex was initially released in the mid 1980s and has since gained wide adoption in academia and the sciences. LaTex users produce a series of tags to add structure and style the document they are working on. Its main focus is typesetting and document preparation, and its tags are based on familiar and logical concepts like chapter or table. A sample LaTeX document would look as follows:

\documentclass [14pt]{article}
\usepackage{name of package being used} 
\title{\Document title} 
\begin{document} 
\section*{Section name}
\subsection*{Sub-section Name}
\end{document}

In the document above, LaTex markup would specify the font size applicable to the document (14pt), as well as delimit different sections of the document (title, section, and sub-section).

Importance for search engine optimization

Your choice of markup language will not impact SEO directly; that is, you can choose HTML, XML, or LaTex and this choice will not necessarily make a page rank higher or lower. Having said that, certain types of markup make it easier for search engines to understand the content of a page. This is the case of meta tags or Google’s Schema markup. Similarly, certain types of schema markup allow Google to display rich snippets in the search results page.

Markup

Screenshot with a recipe in the SERPs of google.com

Therefore, it is recommended to use these markup types on web pages. Altogether, this helps search engines gain a more accurate understanding of a site’s content so they can serve this content to users who are likely to engage with it.

Related links

Similar articles