
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Different Markup Languages Other Than HTML
Markup languages are computer languages that are used to structure, format, or describe relationships between various portions of text documents with the aid of symbols or tags introduced in the document. Compared to traditional programming languages with strict syntax, these languages are easier to read. There are several markup languages available but the most popular among them are discussed one by one. Let's dive into the article for understanding different markup languages other than HTML.
XML
Extensible Markup Language (XML) is a markup language used to store structured data. The elements are defined by using custom tags, which support a variety of elements. It was developed, which could be extended to specify additional elements, while HTML was unable to do so.
It was created with the ability to convey and store data as well as include sender, recipient, heading, and message body. It is more concerned with what the data is than with how it appears. It is employed to represent data, transactions, invoices, etc.
Example
Following is the example, where we are going to use the XML markup language.
<?xml version="1.0" encoding="UTF-8"?> <message> <to>Customer</to> <from>Tp</from> <subject>Choose The Course</subject> <text>Apply Coupon</text> </message>
When we execute the above code, it will generate an output consisting of text displayed on the webpage.
Let's look into the some of the features and drawbacks of the XML markup language.
Features of XML
Effective data exchange
Independent of both software and hardware
with additional markup languages compatible
encourages platform switching
accepts Unicode
Drawbacks of XML
It features redundant syntax and is verbose in nature.
Its cost of transportation and storage is high.
Due to the redundant syntax, the files are typically large.
XHTML
HTML documents that accept custom tags to describe new elements are created using the markup language known as XHTML, or Extensible Hypertext Markup Language. In terms of handling errors, it is stricter than HTML; if there are mistakes in the markup document, the browser won't show the webpage. The HTML document is converted into an XML version that needs to be properly marked up.
The document must contain certain necessary tags such as, <!DOCTYPE>, <html>, <head>, <title> and <body>. Additionally, if using XHTML, the <html> tag needs to have an xmlns attribute. DTD (Document Type Definition) declarations must be included in XHTML web pages. Following are the three different types of DTD.
Transitional DTD
Strict DTD
Frameset DTD
Example
In the following example, we are going to use the XHTML markup language.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>XHTML</title> </head> <body> <div style="color:#090;font-size:56px; font-weight:bold;text-align:center; margin-bottom:-25px;">TUTORIALSPOINT</div> <p style="text-align:center;font-size:25px;"> The Best E-Way Learning </p> </body> </html>
On running the above code, the output window will pop up, displaying the text on the webpage with the applied CSS.
Let's look into the some of the features and drawbacks of the XHTML markup language.
Features of XHTML
A markup language based on XML
Documents are simple to edit, convert, and maintain.
strict syntax and structural requirements
Format is clear, consistent, and organized.
Drawbacks of XHTML
Because of its tight rules, XHTML is more challenging to write than HTML.
It does have a fix for cross-browser compatibility problems.
SGML
A standard for establishing markup languages is provided by Standard Generalized Markup Language (SGML). In order to make files independent of other applications, they are marked up using this technique. To save SGML files, we uses .sgml extension. It works with large files that must undergo regular modifications and are a part of complex systems.
It establishes the connections between the entities, components, and characteristics of a document as well as the guidelines by which a computer system may recognize the beginning and end of an element. It offers the quickest method for transferring files directly between devices and program.
Let's look into the some of the features and drawbacks of the SGML markup language.
Features of SGML
Platform-independent
Elements identified by various tags
Generic types and attributes are found in elements.
Use of delimiters and special characters on a regular basis
Drawbacks of SGML
It has a difficult connecting process.
Writing SGML code is quite difficult.