English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can somebody please explain in the simplist way possible what is the difference between HTML and XHTML?

Many thanks.

2007-12-12 22:47:33 · 11 answers · asked by animalita40 1 in Computers & Internet Programming & Design

11 answers

XHTML and HTML are different in two major ways.
There are technical differences (which have been illuminated by other answers) but there are also very critical style differences, which are even more important in practice.

The technical differences (in a nutshell)
XHTML requires all tags to be closed
XHTML requires all attributes to be in quotes
XHTML is case-sensitive

These seem like a lot of strict arbitrary rules, but they exist for a good reason. It's pretty much impossible to be sure that HTML will ever work properly because it's such a loose standard. XHTML is exciting because it can be validated. That is, when you write code in XHTML, you make a contract that you will follow a certain set of standards, and you can use free software and services to verify you have met those standards. Now you can be comfortable that your page will display properly on any browser which also conforms to the standard. (It's true that HTML can be validated, but valid HTML still doesn't promise anything, because it's too loose a standard)

The stylistic difference is really the important thing. All kinds of crazy tags snuck into HTML over the years, which solved specific problems, but caused a real mess. HTML was partly about defining the meaning of the data and partly about defining its layout. Because it tried to do two different jobs, it did neither well.

XHTML strict (the only version worth worrying about) is strict about handling only the meaning of web pages. It doesn't allow tags like and



All of the formatting of the web page is offloaded from XHTML to CSS (casading style sheets) - a separate (but still easy-to-learn) language.

XHTML is actually easier to learn than HTML, because it has far fewer tags. However, you will certainly want to know CSS as well, because it gives you far more power over your page layout and display than you ever had with old-school HTML.

If you're just starting out, there's no good reason to learn HTML. Go straight to XHTML/CSS, because you will have to do so eventually.

2007-12-13 01:57:15 · answer #1 · answered by Anonymous · 0 0

The function of the languages are that HTML are basically used for writing the web pages on the other hand, XHTML is the extended version of HTML that is highly stricken and XML based and doesn’t allow its users to see the structure.

As far as the nature of the languages are concerned, HTML is a flexible and maintained framework and it requires lenient HTML specific parser. On the other hand, XHTML is a strict one and is restricted set of XML and it really needs to be parsed with standard XML parsers.

Rest of the details can be found on: http://researchpedia.info/difference-between-html-and-xhtml/

2015-03-26 02:23:27 · answer #2 · answered by saba 5 · 0 0

XHTML is an extension of HTML, XHTML is based on XML, XML is a tag metalanguage which is a language meant to create other languages. XHTML has a very strict structure and spelling based on the XML rules. HTML doesn't have a very strict grammar and doesn't follow all the XML rules.
XML was designed as a simplification of SGML to manage information on the Internet and are both based on tags, utilised to classify and give structure to the information on a text document.

2007-12-12 23:24:22 · answer #3 · answered by Pichurri 4 · 0 0

HTML and XHTML are both the languages which are used to write up the web pages. We can say that they two are just like the two sides of a coin....
For more details: http://researchpedia.info/difference-between-html-and-xhtml/

2015-09-27 07:24:20 · answer #4 · answered by Usman 1 · 0 0

The most important difference between the two markup languages is that HyperText Markup Language, or HTML, is an application of SGML (Standard Generalized Markup Language), and allows an author to omit certain tags and use attribute minimization. The Extensible HyperText Markup Language, or XHTML, is an application of XML (Extensible Markup Language). It doesn’t permit the omission of any tags or the use of attribute minimization.

2016-04-09 00:25:05 · answer #5 · answered by ? 4 · 0 0

XHTML is simply a stricter form of HTML which adheres to a stricter XML structure.

Most notable differences are that in XHTML structures must always be closed off i.e.

hi

bye


whereas HTML would be happy with

hi

bye

Empty elements must also be closed
e.g. hi
bye
instead of in HTML
hi
bye
is acceptable

XHTML also requires proper nesting

i.e. hi is Ok whereas
hi isn't

Hope this helps

2007-12-12 22:55:18 · answer #6 · answered by David M 5 · 0 0

XHTML relies heavily on CSS to accomplish the same tasks HTML used to perform, but extensible means that you can do more with XHTML.

2007-12-12 23:39:12 · answer #7 · answered by ray_diator 7 · 0 1

HTML - HyperText Markup Language -> basic
XHTML - Extensive HyperText Markup Language -> adv

html is for starters while xhtml is for adv web developers.
xhtml is actually and extended version of html which covers additional features that ordinary html does not.

2007-12-12 22:55:26 · answer #8 · answered by patrickjamesfranco 2 · 0 1

Simplest possible way ? OK, difference is "X"


On a more helpful note it is eXtesible HTML in that it embeds some XML functionality.

A quick google of XHTML would have told you that though
http://en.wikipedia.org/wiki/XHTML

2007-12-12 22:51:59 · answer #9 · answered by stu_the_kilted_scot 7 · 0 1

google xhtml and it will tell you
x is a better machine

2007-12-12 22:52:46 · answer #10 · answered by muffer_3 6 · 0 2

fedest.com, questions and answers