943,515 Members | Top Members by Rank

Ad:
Aug 21st, 2008
0

Is there a difference?

Expand Post »
Does anyone know if I can head directly for XHTML without learning HTML?
Is there a difference?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Tony0930 is offline Offline
52 posts
since Jun 2008
Aug 21st, 2008
0

Re: Is there a difference?

I think there is a lot difference between XHTML and HTML
Reputation Points: 12
Solved Threads: 34
Posting Whiz
sreein1986 is offline Offline
306 posts
since May 2008
Aug 21st, 2008
0

Re: Is there a difference?

There is quite a few differences in the markup of XHTML compared to HTML, but most are simple to get used to, ie you need to use lowercase letters in XHTML and use closing tags properly.

eg:
<BODY>
<P>your text here</P>
</BODY> (This is incorrect xhtml)

<body>
<p>your text here</p>
</body> (this is correct)

If it is a case of learning one of them correctly I would suggest XHTML, probably starting with XHTML 1.0 Transitional as XHTML is now the W3C compliant standard. The advantages of XHTML 1.0 Transitional is that it allows a lot of things like iframes and opening links in new windows that the Strict version will not. Unless you really want to give yourself a headache I would stay away from XHTML 1.1
Reputation Points: 10
Solved Threads: 0
Newbie Poster
steve136 is offline Offline
6 posts
since Apr 2008
Sep 8th, 2008
0

Re: Is there a difference?

They are pretty much the same except that XHTML is more strict and must be lower case. Also you have to end and open tags, where you want them to end. I recommend XHTML as it's just good practice to make your code like that.
Reputation Points: 11
Solved Threads: 6
Junior Poster in Training
MelechM is offline Offline
55 posts
since Sep 2008
Sep 15th, 2008
0

Re: Is there a difference?

If you’ve mastered HTML, you’re 90% of the way towards using XHTML. They’re actually very much the same thing—tag-based markup languages used to display Web pages. The difference is only seen by the people creating the pages (Web designers, programmers, etc.) and focuses on “forgivability”— HTML allows for some ugly code (mixed-case tags like <BoDy>, improperly nested elements, and unclosed tags), while XHTML does not. If you write HTML, it’s probably a good idea to start using XHTML practices anyway.

In XHTML, all tags must be lowercase.
In XHTML, all tags must be closed.
In XHTML, tags must be properly nested.

the above are not in html...

And,

* XHTML must be served with an XML MIME type, such as application/xml or application/xhtml+xml.
* HTML must be served as text/html.

It is the MIME type that determines what type of document you are using. If you use attempt to send XHTML as text/html, you are actually just using HTML, possibly with syntax errors.

Technically, according to the spec, XHTML 1.0 is allowed to be served as text/html. But, due to the above reason, such a document is considered to be an HTML document, not an XHTML document.

see it for reference:
http://wiki.whatwg.org/wiki/HTML_vs._XHTML
Last edited by Shanti C; Sep 15th, 2008 at 4:10 am.
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 23rd, 2008
0

Re: Is there a difference?

HTML is rapidly being replaced by XHTML. The differences are very minor, but the results of switching can be worth the effort. The primary benefit is that XHTML is more widely accepted in non "computer" devices like cell phone, palm devices and other scaled down browsers. This is commonly called portability between devices.
XHTML is also said to be extensible, which is the fancy way of saying the new tags can be added without a new document type declaration.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
digitaldesperad is offline Offline
18 posts
since Sep 2008
Sep 29th, 2008
0

Re: Is there a difference?

there are difference but i think a newbie does not got any difference.
Reputation Points: 15
Solved Threads: 21
Posting Whiz in Training
nikesh.yadav is offline Offline
219 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: The littler picture to the left of the address bar..
Next Thread in HTML and CSS Forum Timeline: dreamweaver cs3 and hover text





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC