Category: 

What are the Differences Between XHTML and XML?

Article Details
  • Written By: Robert Grimmick
  • Edited By: R. Halprin
  • Last Modified Date: 28 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Helium is the only element that was discovered in space before it was found on Earth.  more...

December 10 ,  1948 :  The UN adopted the Universal Declaration on Human Rights.  more...

The eXtensible HyperText Markup Language (XHTML) and the eXtensible Markup Language (XML) are two types of markup languages that use tags to mark and describe data in a structured format. XML is primarily made up of rules that govern tag syntax and is often used as a template for other markup languages. XHTML is a combination of the syntax rules from XML and the tags of the earlier HyperText Markup Language (HTML) used to create web documents. Both XHTML and XML are used on the web, but the former is mostly confined to webpages while XML and languages based upon have a wider variety of purposes, including in databases, web feeds, and podcasting.

Markup languages such as XHTML and XML create structured documents, or documents that include base content and some additional information that describes the role or purpose of the base content. The concept is similar to a college professor conveying information to students through copy editing symbols; documents are “marked up” with structural information that identifies the function of certain pieces of content. Most modern markup languages use tags enclosed within angled brackets.

Ad

XML is a special type of markup language called a metalanguage that can serve as a template for other languages. Instead of creating a list of predefined tags and attaching meaning to them, the creators of this unique master language focused only on establishing syntax rules. Companies, individuals, groups, and industries can therefore attach their own meanings to XML documents and create unique methods of interpreting those meanings. This has allowed XML to serve as the basis for hundreds of markup languages including one dedicated to mathematical formulas and another developed to store archaeology research data.

One of the markup languages based on this metalanguage template is XHTML, a revised version of the HTML. XHTML and XML share a similar set of rules that govern how tags can be used, but the former uses predefined tags to convey structural information to web browsers; a <p> tag denotes a paragraph, while an <h1> identifies a level one heading. All tags in XHTML have established functions, and new tags must be approved by the World Wide Web Consortium before they can be included in any future version of the language.

It is common to find both XHTML and XML used online, but they are generally used for different purposes. The former is most often used to code webpages, while the later is put to work in the back end of complex web applications and databases. Closer to the end user, XML-based languages like Atom and Really Simple Syndication (RSS) enable web feeds and podcasting. XML’s versatility has also led to its use in offline environments, where it can be found in preference files and office document file formats.

Ad

You might also Like

Recommended

Discuss this Article

Feryll
Post 3

@Sporkasia - You are right about HTML being a very simple language. I think my grandmother could have learned it, and she knows very little about computers at all. However, people were writing a lot of bad code with HTML so that forced browsers to work harder.

You may have to devote a bit more time to learning the newer languages. They are more complex, which can be good and bad.

Sporkasia
Post 2

@Animandel - I know what you mean about those editing mark-up symbols. I was a journalism student in college and we had to know them backwards and forwards. I also agree that these languages used for computer file communication are intimidating to the average person.

I didn't think I would be able to learn them, but years ago I saw that I could get more work assignments by learning HTML. Once I dove into the language, I was surprised at how easy it was for me to understand, and then use. I was able to get all of the information I needed to grasp the language by going online and visiting different websites.

Now, XML and XHTML may be

more difficult to understand, but I bet I could pick them up before long if I tried to learn them. The main obstacle to learning them is the fear that you won't be smart enough to understand what they are all about.

Animandel
Post 1

I get so confused by all of those computer languages like XHTML and XML. Then again, I never fully understood the copy editing symbols that instructors would write all over my papers, and the article does say those symbols and that language are comparable to this online computer language.

In college, I would always go back to the professors in my classes to ask them to explain what mistakes I had made because I didn't understand what was going on from their symbols, or what I needed to do to make the corrections.

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email