Mark Forums Read
  #1  
Old 01-14-2009, 05:50 AM
ajit22 ajit22 is offline
Member
 
Join Date: Jan 2009
Posts: 54
ajit22 is on a distinguished road
Default XHTML vs HTML

* the tags in the page MUST be in lower case, so instead of <IMG SRC="resource/frankisboat.gif" WIDTH="389" HEIGHT="227" BORDER="0" ALT="boat">, as we would do in HTML, we instead use: <img src="resource/frankisboat.gif" width="389" height="227" border="0" alt="boat" />
* all tags must close, either by using a corresponding closing tag which has a slash, like paragraph ( <p></p> ) for example, or some tags are self closing like the above img src tag and line break ( <br /> ). In HTML, many of these tags were simply left open.
* all tags must be properly nested, so if you start tag "a" and then start tag "b", you must close tag "b" before you close tag "a"
* some tags which were previously allowed are no longer allowed, although see the discussion below of document type declarations (DTD's).
* all attributes must also be lowercase
* all values for attributes must be encased in single or double quotes
* all attributes must be long form, not abbreviated, for example: disabled="true" in XHTML vs DISABLED in HTML
* structure must be separated from content. So for example, the <p> tag is a content tag (paragraph) so you can't put a table in it for example, because a table is a format construct. You can however put the <p> tag inside <td> </td> tags with no problem because the content goes in the construct, not the other way around.

The first thing you will notice if you look at the source of an XHTML document is that the first line is a document type declaration (DTD also called the DOCTYPE). There are three that are used, strict (that will only validate if you have no deprecated tags), transitional (which will still validate with deprecated tags) and frameset (which is for a page that "sets" up "frames"). Oddly enough, even though all tags in XHTML are lower case, parts of the DTD must be in upper case. The three DTD's look like this:

* Strict -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
* Transitional -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
* Frameset -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd">
__________________
New York Web design
Website design

Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
  #2  
Old 06-22-2009, 10:25 AM
gkumar gkumar is offline
Senior Member
 
Join Date: Jun 2009
Posts: 203
gkumar is on a distinguished road
Default XHTML vs HTML

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.
Reply With Quote
  #3  
Old 01-19-2010, 07:55 AM
Meltonmist Meltonmist is offline
Junior Member
 
Join Date: Jan 2010
Posts: 4
Meltonmist is on a distinguished road
Default

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.
__________________
Computer repair center
Reply With Quote
  #4  
Old 03-02-2010, 09:29 AM
gerdonhanry gerdonhanry is offline
Junior Member
 
Join Date: Feb 2010
Posts: 3
gerdonhanry is on a distinguished road
Default

* XHTML is case-sensitive, HTML is not. All tags and attributes must be lowercase in XHTML.

* XHTML, being XML, must be well-formed. Every element must have an end tag, or use the self-closing tag syntax. HTML allows some end tags and even some start tags to be omitted.

* If an XML parser encounters a well-formedness error, it must abort. An SGML or HTML parser is expected to try to salvage what it can and keep going.

* All attributes must have a value in XHTML. HTML allows some attributes (e.g., selected) to be minimised.

* All attribute values must be surrounded by double or single quotes. HTML allows quotes to be omitted if the value contains only alphanumeric characters (and some others).

* The comment syntax is more limited in XHTML, but that's rarely an issue for most designers/developers.
__________________
Web Design Kent
Reply With Quote
  #5  
Old 04-21-2010, 12:30 PM
chris34 chris34 is offline
Member
 
Join Date: Jan 2010
Location: U.K
Posts: 93
chris34 is on a distinguished road
Default

These are great Information friend which You have shared here with us about the difference between XHTML vs HTML and I found it really useful for myself.
__________________
Spam
Reply With Quote
  #6  
Old 09-10-2010, 10:41 AM
maddy26 maddy26 is offline
Junior Member
 
Join Date: Sep 2010
Posts: 6
maddy26 is on a distinguished road
Default

XHTML is advanced HTML. Not all browsers support it, so pages must test first and serve what's supported.
__________________
Sheffield Weekend
Reply With Quote
  #7  
Old 09-28-2010, 07:55 AM
john john is offline
Junior Member
 
Join Date: Sep 2010
Posts: 5
john is on a distinguished road
Default

I will say only this that both HTML and XHTML both are important
Reply With Quote
  #8  
Old 10-20-2010, 04:51 AM
Miley Tipton Miley Tipton is offline
Junior Member
 
Join Date: Oct 2010
Posts: 10
Miley Tipton is on a distinguished road
Default

hi everyone,
I am new to this field of web designing, and I don't know anything about XHTML, Because I am learning HTML, and as some people said HTML is replaced by XHTML, So I truly want to know should I switch my learning process to XHTML, Or is it necessary to learn HTML first?
Reply With Quote
  #9  
Old 08-16-2011, 09:22 AM
peterjack11 peterjack11 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 29
peterjack11 is on a distinguished road
Default

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.
__________________
web design in ahmedabad
Reply With Quote
  #10  
Old 08-18-2011, 09:47 AM
amankumar amankumar is offline
Senior Member
 
Join Date: Jul 2011
Posts: 146
amankumar is on a distinguished road
Default xhtml and html

thanks for sharing the post .
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:51 PM.


Powered by vBulletin Version 3.6.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0