 | 
01-14-2009, 05:50 AM
| | Member | | Join Date: Jan 2009
Posts: 54
| | 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"> |  Sponsored Ads | | Member | | Join Date: LongTime Posts: 1100 | | 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! | 
06-22-2009, 10:25 AM
| | Senior Member | | Join Date: Jun 2009
Posts: 203
| | 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. | 
01-19-2010, 07:55 AM
| | Junior Member | | Join Date: Jan 2010
Posts: 4
| | 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. | 
03-02-2010, 09:29 AM
| | Junior Member | | Join Date: Feb 2010
Posts: 3
| | * 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. | 
04-21-2010, 12:30 PM
| | Member | | Join Date: Jan 2010 Location: U.K
Posts: 93
| | 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. | 
09-10-2010, 10:41 AM
| | Junior Member | | Join Date: Sep 2010
Posts: 6
| | XHTML is advanced HTML. Not all browsers support it, so pages must test first and serve what's supported. | 
09-28-2010, 07:55 AM
| | Junior Member | | Join Date: Sep 2010
Posts: 5
| | I will say only this that both HTML and XHTML both are important | 
10-20-2010, 04:51 AM
| | Junior Member | | Join Date: Oct 2010
Posts: 10
| | 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? | 
08-16-2011, 09:22 AM
| | Junior Member | | Join Date: Jul 2011
Posts: 29
| | 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. | 
08-18-2011, 09:47 AM
| | Senior Member | | Join Date: Jul 2011
Posts: 146
| | xhtml and html thanks for sharing the post . |  Sponsored Ads | | Member | | Join Date: LongTime Posts: 1100 | | 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! | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT. The time now is 12:51 PM. |  | |