Difference between HTML and xHTML

hoangvu

New member
Joined
Jun 6, 2012
Messages
1,844
Points
0
Hello everyone,

Web design beginner here, but I have been using HTML for quite a while now. I have not tried xHMTL though.
Frankly speaking, I have no idea how xHMTL is different with HTML. Of course, I've been I know it is better than HTML as it I've heard it makes more dynamic web page.

Here, I want to ask...
What exactly is/are the difference between HTML and xHTML?

thanks.
 

Enosis Learning

New member
Joined
Mar 21, 2013
Messages
10
Points
0
Hi Edmond,
We can say that to some extend xHTML is as same as HTML 4.01 with very less but most important differences.
xHTML is more strict version than HTML 4.01. So ofcource if you wish to learn the xHTML you must know HTML. Then only you will find xHTML very easy to learn.
xHTML stands for extensible hypertext language which is the application of XML. It helps in internet revolution.

Here are some important differences between HTML and xHTML.
xHTML
  • In xHTML DOCTYPE is mandatory
  • Add xmlns attribute to the html element in evry page.
  • Basic tags like <html>, <head>, <title>, <body> are mandatory in every page with its closing tags.
  • xHTML elements must be properly nested and closed.

e.g. <b><u>webmastersun.com</u></b> is right where
<b><u>webmastersun.com</b></u is wrong.
  • All tags and attributes in xHTML must be in lower case.
  • Attribute values must be quoted.
  • Attribute shortcut or minimization is not allowed in xHTML.

e.g. <input checked="checked"> is right where
<input checked> is wrong.
  • All empty elements of HTML must be closd in its start tag itself.

e.g. a horizontal line </hr> is right
a horizontal line <hr> is wrong

In short xHTML is a strict version of HTML 4.01. That means HTML is exactly opposite to the xHTML, the above rule can be break in HTML very easily but if you do so your website may not show the proper result in internet or may not be validated by well known browsers. So its better to always follow the above xHTML rules.



Hello everyone,

Web design beginner here, but I have been using HTML for quite a while now. I have not tried xHMTL though.
Frankly speaking, I have no idea how xHMTL is different with HTML. Of course, I've been I know it is better than HTML as it I've heard it makes more dynamic web page.

Here, I want to ask...
What exactly is/are the difference between HTML and xHTML?

thanks.
 

domhost31

New member
Joined
Oct 18, 2012
Messages
40
Points
0
Hey..This is very cool and thanks for explaining this in a detailed way..I got to learn some points new..
 

harish27

New member
Joined
Mar 28, 2013
Messages
2
Points
0
Hi Edmond,
The simple differences between HTML and xHTML is

HTML:
Which is about displaying information.
Which is a static web page.
HTML is an application of SGML(Standard Generalized Markup Language)

xHTML:
Which is about describing information.
Which is dynamic web page. xHTML is a combination of XML and HTML.
xHTML is an application of XML(Extensible Markup Language)
 

tayloralina

New member
Joined
Mar 11, 2013
Messages
40
Points
0
HTML is about displaying information while XHTML and about describing information. XHTML was designed to describe data and focus what data while HTML is designed to display data and how it looks like the focus datas.
 

annahussy

New member
Joined
Nov 30, 2012
Messages
30
Points
0
Here you ask such a nice question about the difference between HTML and XHTML. HTML is the hypertext markup language which is mostly used to design and display web pages. XHTML is a combination of XML and HTML. IN HTML you need to define tags.
 

BloodMaster

New member
Joined
Aug 5, 2013
Messages
346
Points
0
Basically, both HTML and xHTML are same. Both are used for define what a web page should look like. But, xHTML is newer and more flexible than HTML. xHTML is based on principals of XML. For more information checkout the link.

Code:
http://www.webstandards.org/learn/articles/askw3c/oct2003/
 

KevinNash

New member
Joined
Oct 4, 2013
Messages
8
Points
0
Simple difference between XHTML and HTML are-
1.XHTML is an application of XML, which is quite a strict angle-bracket language.
2.HTML is an application of SGML, which is a much less strict angle-bracket language.
 
Older threads
Newer threads
S
Replies
11
Views
6,375
Replies
4
Views
2,817
Replies
1
Views
2,228
Replies
0
Views
1,866
Replies
1
Views
3,384
Latest threads
Replies
2
Views
99
Replies
1
Views
182
Replies
5
Views
394
Replies
11
Views
541
Replies
2
Views
233

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top