XHTML || Introduction to XML and XHTML || OnlineNotesNepal

XHTML || Introduction to XML and XHTML || OnlineNotesNepal

XHTML (Extensive Hypertext Markup Language)

XHTML stands for Extensive Hypertext Markup Language. It is the next step in the evolution of the internet. The XHTML 1.0 is the first document type in the XHTML family.

It is almost identical to HTML 4.01 with only a few differences. This is a cleaner and stricter version of HTML 4.01.

It was developed by World Wide Web Consortium (W3C) to help web developers make the transition from HTML to XML. By migrating to XHTML today, web developers can enter the XML world with all of its benefits, while still remaining confident in the backward and future compatibility of the content.

The XHTML documents contain three parts, which are discussed below:

  • DOCTYPE: It is used to declare a DTD.
  • head: The head section is used to declare the title and other attributes.
  • body: The body tag contains the content of web pages. It consists of many tags.

Why use XHTML?

  • The documents here are validated with standard XML tools.
  • It is easy to maintain, convert, edit documents in the long run.
  • It is used to define the quality standard of web pages.
  • It is an official standard of the W3C, your website becomes more compatible and accurate with many browsers.

Benefits of XHTML:

  • All the tags must have closing tags and are nested correctly. This generates cleaner code.
  • The documents are lean which means they use less bandwidth. This reduces cost particularly if your website has 1000s of pages.
  • The documents are well formatted well-formed and can easily be transported to wireless devices, Braille readers, and other specialized web environments.
  • All new developments will be in XML (of which XHTML is an application).
  • It works in association with CSS to create web pages that can easily be updated.

What is SGML?

This is Standard Generalized Markup Language (SGML) application conforming to International Standard ISO 8879. HTML is widely regarded as the standard publishing language of the World Wide Web.

This is a language for describing markup languages, particularly those used in electronic document exchange, document management, and document publishing. HTML is an example of a language defined in SGML.

Difference Between HTML and XHTML:


HTML or HyperText Markup Language is the main markup language for creating web pages XHTML (Extensible HyperText Markup Language) is a family of XML markup languages that mirror or extend versions of the widely used Hypertext Markup Language (HTML)
It is based on SGML. It is based on XML.
Proposed by Tim Berners-Lee in 1987 World Wide Web Consortium Recommendation in 2000.
It does not provide standards and specifications such as XHTML. It provides more precise standards and specifications on data.
It is easier to debug. It is harder to debug.
It is not well-formatted like XHTML. It is well-formatted and cleaner than HTML.
It is not case-sensitive. The attributes and tags can either be lowercase or uppercase. It is case-sensitive. The attributes and tags should be in lowercase.

If you liked our content XHTML, then you may also like XML 

Be the first to comment

Leave a Reply

Your email address will not be published.