ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

HTML and XHTML: What's the difference?

Updated on August 28, 2011

HTML and XHTML are essentially the same language. However, there is a difference between them. One belongs to the future and the other might soon become extinct. You better pick the right one for your use.

The Internet, The World Wide Web and HTML

The Internet is a myriad of computers connected to one another. The World Wide Web is a volatile collection of billions of documents that reside on these computers and are written in a form of HTML. Finally, HTML, or HyperText Markup Language, is the basic language of the Internet with two important features:

  • you can create links in HTML thus accessing other parts of the Internet,
  • any computer can read HTML, because it's stored in text-only files.


Although, any computer can read an HTML page, it doesn't mean everybody will experience the same phenomenon while viewing a page. Your experience will depend on the type of computer, the monitor, the speed of the Internet connection, and lastly, the software used to view the page: the browser.

It's sort of like the French Riviera. It's essentially the same thing, however a person living in a luxury apartment in a five star hotel on the beach will see it differently from a person who sleeps on a bench.

Browsers and Browser Wars.

When you design a web page, don't worry too much, as your control is limited at best. People viewing your page won't get the experience you intend to give them. Browsers, like Opera, IE, Safari or Firefox, all display the same web page slightly differently.

Companies in the '90s, guided by their greed for money and a bigger chunk of the Internet, wanted to ruin our experience of the French Riviera. They were like five-star hotels sectioning of their own parcels of the beach raising big fences so that we, the tourist, could not walk freely, but instead were limited to the small areas owned by the hotel we stayed in.

How did this come about?

In 1994, Netscape Communications Company created a set of extensions to HTML that only their browsers could view. They deprived HTML of its second important feature of being text-based. They sectioned off a part of the beach where no one but their guests could enter. Surfers using Netscape could view pages with colored text, photographs, and other improvements, while those using other browsers could not. And since everyone liked Netscape's parcel of the beach they flocked to the company and its browser.

Microsoft didn't take long to follow suit. And then other companies followed. Web developers had a hard time designing websites that could be viewed in most browsers without the loss of much of their appeal.

W3C - the Web Police

The aim and purpose of the World Wide Web Consortium is to convince the Web community of the importance of universality while attempting to satisfy its thirst for beautiful looking pages. At the peak of the browser wars this universality was almost completely ruined. The W3C had to break down the fences and push for standardization.

The W3C consists of all the companies that own the web. Their membership list is found here:
http://www.w3.org/Consortium/Member/List

Their aim is to come together, agree on the standards and try to differentiate their products with speed, ease of use, price, and other features that don't turn the Web into the tower of Babel.

Standardization of HTML

Goals:

  • standardizing the proprietary extensions:
    - including some in the official specifications
    - removing others altogether,
  • encouraging browser manufacturers to closely support the official HTML specifications,
  • breaking with the tradition of joining content, structure, and formatting in a single document,
  • formatting instructions saved separately from the content and structure allowing their application to not just to single paragraphs or pages but to the entire site.

CSS and XML

These goals resulted in the creation of Cascading Style Sheets (CSS) and the deprecation of formatting elements from HTML.

A new language was created in place of HTML to give web pages the desired structure that would make sloppy code go away and replace it with a system to which new features could be added. This language was XML or Extensible Markup Language.

XML was very similar to HTML, but it was not intended to create web pages. It was a language for creating other languages. These created custom languages would then in turn be used to create the formatting of web pages.

The price was high. XML was a much stricter language than HTML. It demanded careful attention to upper- and lowercase letters, quotation marks, closing tags, and other minutiae. The question remained, what would happen to the millions of web pages already written in HTML.

The Annihilation of the Wicked and XHTML

Since XML was a language to design other languages, the W3C could rewrite HTML in XML so that the new language had all the features of HTML, making it possible to be read by all browsers, while it also gained the power of the firm structure of XML, making it suitable to be used with CSS. This new language became known as XHTML.

HTML and XHTML are essentially the same language, but XHTML has a much stricter syntax. Browsers can understand both languages. However, as the standardization of the web is moving forward the deprecated tags are expected to slowly disappear and fade out of use. This means that future browsers may not be able to recognize them any more. To be on the safe side, web designers are advised to use XHTML syntax and forget these ancient tags. Web pages are expected to derive their formatting information from attached CSS rather than deprecated formatting tags.

working

This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://corp.maven.io/privacy-policy

Show Details
Necessary
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
Features
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Marketing
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Statistics
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
ClickscoThis is a data management platform studying reader behavior (Privacy Policy)