Difference between HTML and xHTML

Marc0

Well-known member
Registered
Joined
Jun 6, 2012
Messages
890
Points
28
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
Registered
Joined
Mar 21, 2013
Messages
4
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

Member
Registered
Joined
Oct 18, 2012
Messages
36
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
Registered
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

Member
Registered
Joined
Mar 11, 2013
Messages
16
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

Member
Registered
Joined
Nov 30, 2012
Messages
32
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.
 

semaphore.v

Member
Registered
Joined
Jun 26, 2013
Messages
62
Points
0
The most important difference between the two markup languages is that HTML is an application of SGML and allows an author to omit certain tags and use attribute minimization.The XHTML, is an application of XML.It doesn't permit the omission of any tags or the use of attribute minimization.
 

BloodMaster

Well-known member
Registered
Joined
Aug 5, 2013
Messages
93
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
Registered
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
Replies
0
Views
2,680
Replies
11
Views
6,305
Replies
8
Views
4,597
Replies
5
Views
3,678
Replies
1
Views
2,500
Newer Threads
S
Replies
11
Views
5,980
Replies
0
Views
2,215
Replies
1
Views
2,575
Replies
0
Views
2,234
Replies
1
Views
3,597
Latest Threads
Replies
1
Views
27
Replies
0
Views
190
Replies
1
Views
40
Replies
2
Views
83
Recommended Threads
Replies
7
Views
3,687
Replies
23
Views
13,640
Replies
9
Views
4,619
Replies
15
Views
4,618
Similar Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

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