Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,518 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,741 people online right now. Registration is fast and FREE... Join Now!




Is there a difference?

 
Reply to this topicStart new topic

Is there a difference?

Tony0930
14 Aug, 2008 - 07:05 PM
Post #1

D.I.C Head
**

Joined: 16 Jun, 2008
Posts: 109


My Contributions
Does anyone know if I can head directly for XHTML without learning HTML?
Is there a difference?

User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Is There A Difference?
14 Aug, 2008 - 07:27 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 50 times
Dream Kudos: 550
My Contributions
You can go right into XHTML and skip HTML... the two are very similar (XHTML should be roughly compatible with HTML but it does not really work the other way).

There are differences since XHTML is more strict since it has to conform to and XML schema but in the end they all sort of form a amorphous blob of tags. People often write HTML say things like "HTML can be passed though XSLT" -- which may or may not be true, but what they should say is "XHTML can be passed though XSLT" since HTML is sloppy and allows people to do sloppy things that will confuse a XSLT parser (you can still do it, but it is really aggrivating and generally has to be done on a case-by-case basis where as XHTML is far far far easier to work with).

Since it would seem that XHTML is more likely the future of HTML I would not worry too much about learning HTML (which in the end you will just begin to see as sloppy XHTML).


User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Is There A Difference?
14 Aug, 2008 - 07:33 PM
Post #3

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,459



Thanked: 10 times
Dream Kudos: 325
My Contributions
There's an online validator for (X)HTML by the way.

(More aimed at the OP.)

This post has been edited by Tom9729: 14 Aug, 2008 - 07:33 PM
User is online!Profile CardPM
+Quote Post

Trake
RE: Is There A Difference?
14 Aug, 2008 - 09:11 PM
Post #4

D.I.C Head
**

Joined: 29 Jun, 2007
Posts: 60


My Contributions
QUOTE(NickDMax @ 14 Aug, 2008 - 08:27 PM) *

Since it would seem that XHTML is more likely the future of HTML I would not worry too much about learning HTML (which in the end you will just begin to see as sloppy XHTML).


I agree with the rest of your post and I do agree with the idea that learning XHTML is better for now, but they are working on HTML 5 as well as XHTML 2 so in the future HTML should be better than it is now. But this makes little difference to the choice of learning as if you know XHTML you should be able to code in HTML with minor changes.
User is offlineProfile CardPM
+Quote Post

abgorn
RE: Is There A Difference?
15 Aug, 2008 - 02:00 AM
Post #5

Hello Crap for Brains
Group Icon

Joined: 5 Jun, 2008
Posts: 881



Thanked: 5 times
Dream Kudos: 50
My Contributions
If you don't mind me asking, why would you skip to XHTML anyway?
User is offlineProfile CardPM
+Quote Post

perfectly.insane
RE: Is There A Difference?
15 Aug, 2008 - 02:05 AM
Post #6

D.I.C Addict
Group Icon

Joined: 22 Mar, 2008
Posts: 558



Thanked: 46 times
Dream Kudos: 25
Expert In: C/C++

My Contributions
In a basic sense, XHTML is HTML that conforms to the syntax rules of XML, whereas HTML conforms to the syntax rules to SGML. That is the main difference. This means that XHTML can be parsed by XML parsers, whereas plain HTML usually cannot (as XML requires single tags to be written like <tag/>, so <tag> would make an XML parser generate an error. Also, I believe it gets rid of the <p> special case (it doesn't have to have an end tag, even though it's really an element that contains text).

XHTML can be manipulated by XSLT, whereas plain HTML usually cannot.
User is offlineProfile CardPM
+Quote Post

SanjitVignesh
RE: Is There A Difference?
24 Sep, 2008 - 10:24 AM
Post #7

New D.I.C Head
*

Joined: 19 Sep, 2008
Posts: 13


My Contributions
It is all about compatibility. Normal codes will not work when a internet user is surfing from his mobile(or other GPRS). To provide a global standard and compatibility, XHTML was used.

To completely learn about web-developing, visit www.w3schools.com
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 09:16PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month