Markup Languages


Markup languages are computer languages that are used to structure, format, or define relationships between different parts of text documents with the help of symbols or tags inserted in the document. These languages are more readable than usual programming languages with strict syntax. While they may sound complicated, they're actually quite simple and easy to use once you get the hang of them. In this blog post, we'll explore what markup languages are, how they work, and some of the most common examples you're likely to encounter.


First, let's define what a markup language is. At its core, a markup language is a way to add additional information to text in order to indicate how that text should be formatted. This additional information is added in the form of "tags" - snippets of code that are placed around the text you want to format. These tags tell a program or website how to display that text.


For example, let's say you wanted to make a word bold in a document. In a markup language, you would surround that word with a "bold" tag. This might look something like this:



When you view this text in a program or website that understands the markup language, the word "bold" will appear in a bold font.


So, how do these tags actually work? Essentially, the markup language provides a set of rules for how different tags should be displayed. For example, the "bold" tag might be defined to display its contents in a bold font, while a "heading" tag might be defined to display its contents in a larger font size. These rules are built into the program or website that's displaying the text, so all you need to do is add the appropriate tags and the program will take care of the rest.


There are many different markup languages in use today, each with its own syntax and set of rules. Some of the most common examples you're likely to encounter include:


HTML – Hypertext Markup Language

SGML – Standard Generalized Markup Language

XHTML – eXtensible Hypertext Markup Language

XML – eXtensible Markup Language

Markdown Markup Language

KML – Keyhole Markup Language


HTML:

Hypertext Markup Language (HTML) is a markup language used to create and link webpages. It defines the basic structure of a web page and contains meta-data about the page and a series of elements to be displayed on the web page. It uses predefined tags such as <table>, <form>, etc. to render different elements on the webpage. Each element requires starting and ending tag with content inside it. Marked up document written in HTML is displayed by a web browser that interprets different tags and accordingly formats and structures the content of the document before displaying it. It can be written in a plain text editor and can be associated with styling sheets such as CSS (Cascading Style Sheets)  and scripting languages such as JavaScript.


Features:

  1. Easy to learn

  2. Platform-independent

  3. Support audio, video, and images embedded web pages

  4. Supported by all browsers

  5. Can be integrated with styling and scripting languages


Drawbacks:

  1. It can only create static web pages because of its static nature.

  2. It offers limited security features.

  3. It requires long code for creating even a simple web page.


SGML:

Standard Generalized Markup Language (SGML) is a markup language that provides a standard for defining markup languages. It is used for marking up files such that they are no longer dependent on any other application. It uses .sgml extension for saving SGML files. It manipulates massive files which require frequent revisions and is a part of complicated systems. It defines the relationship between entities, elements, and attributes of a document and also defines rules that allow the computer system to identify the start and end of an element. It provides the simplest way to exchange files between machines and applications directly.



Features:

  1. Platform independent

  2. Elements marked by different tags

  3. Elements have generic types and attributes

  4. Consistent use of delimiters and special characters

  5. String substitution for standard boilerplate text, and document management


Drawbacks:

  1. It has a complex linking procedure.

  2. It is very hard to write SGML code.



XHTML:

Extensible Hypertext Markup Language (XHTML) is a markup language that is used to create HTML documents that support custom tags to define new elements. It is more strict than HTML in terms of error handling i.e browser doesn’t display web pages in case of errors in the markup document. It creates an XML version of the HTML document which must be marked up correctly. It specifies some mandatory tags such as <!DOCTYPE>, <html>, <head>, <title>, and <body> that should be present in the document. Also <html> tag should contain xmlns attribute in case of XHTML. It is necessary to include DTD (Document Type Definition) declaration in XHTML web page. There are three types of DTD as follows.

  1. Transitional DTD

  2. Strict DTD

  3. Frameset DTD

XML is used to define the quality standard of web pages and make websites more compatible and accurate with browsers. Also, it is easy to maintain and update XHTML documents because of well-formatted clean code.



Features:

  1. XML-based markup language

  2. Easy to maintain, convert and edit documents

  3. Strict rules for syntax and structure

  4. Clean, consistent, and well-structured format

  5. Compatible and accurate with many browsers


Drawbacks:

  1. It is difficult to write XHTML code than HTML because of strict rules.

  2. It does have the solution for cross-browser combability issues.


XML:

Extensible Markup Language (XML) is a markup language used for storing structured data. It uses custom tags to define the elements which support a wide range of elements. It was developed because HTML was unable to define new elements hence XML was introduced which was extensible to define custom elements. It was designed to store and transport data and contain information about the sender, receiver, heading, and message body. It is more focused on what data is rather than how data looks. It is used for representing documents, data, transactions, invoices, etc. 



Features:

  1. Efficient data sharing

  2. Software and hardware independent

  3. Compatible with other markup languages

  4. Supports platform transition

  5. Supports Unicode


Drawbacks:

  1. It is verbose in nature and has redundant syntax.

  2. It has high storage and transportation cost.

  3. It generally has large file sizes due to redundant syntax.


Markdown:Markdown is a lightweight markup language that describes how text should look on a page. HTML is another example of a markup language. Markdown is a style of writing documents that makes it easy to define what the content should look like. It describes headers, text styles, links, lists and so much more. 


Markdown is used in documentation, articles, and notes and can even be used to build a webpage. If you use GitHub, you'll be familiar with the “readme.md” files that show up in the root of a repository. That “md” stands for markdown. You can even create a readme on your GitHub profile to customize your GitHub profile page.


KML: Keyhole Markup Language (KML) is an XML notation for expressing geographic annotation and visualization within two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer.

The KML file specifies a set of features (place marks, images, polygons, 3D models, textual descriptions, etc.) that can be displayed on maps in geospatial software implementing the KML encoding. Every place has a longitude and a latitude. Other data can make a view more specific, such as tilt, heading, or altitude, which together define a "camera view" along with a timestamp or timespan. KML shares some of the same structural grammar as Geography Markup Language (GML). Some KML information cannot be viewed in Google Maps or Mobile.




Comments

Post a Comment