FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


What is the difference between HTML and XHTML?





ammonkc
I keep hearing about xhtml, but I gotta admit that I don't really understand what the difference is between XHTML and plain old HTML. I know, its kind of embarassing, I should know this.
How are they different? What is XHTML used for? and what are the advantages of using XHTML? thanks
misterdimiz
Read tutorials here:
http://www.w3schools.com/
snowboardalliance
xhtml is newer and follows more strict rules. The output of the two can be basically the same, and most xhtml code is html code. Like he said, read there for any other info if you want.
Grimboy
XHTML is a version of html reformed to conform to XML standards. (XML itsself is quite fluffy, that's not to say good things don't come of it) It is the first step to cleaner markup. The next step is modularisation (XHTML 2.0). Mobile and embedded devices need to be able to parse syntax quickly using the little power they have. If you use strict XHTML then the idea is that very low power platforms will be able to use your site and programs (such as search engines) will be able to efficiently understand. Finally there are more schematic tags coming about so if they are used then your site will be more accessable.

It's good but you shouldn't get to bogged down it trying to get it perfect, I can and it's annoying and for the most part impractical.
THE11thROCK™
If you convert your HTML to XHTML, then your site can better conform to higher standards like XML. You can try to validate your site with W3C of how much your site is XHTML compatible.
whoa
XHTML is W3C's attempt to clean up the web. It has no real advantages over HTML apart from the ease of intergrating XML and RSS applications.

Valid XHTML has many strict requirements
/example:
    All Tags must be lowercase, as Uppercase is not understood in XML applications or XHTML

    All values must be quoted, i.e(height=32 height="32")


I suggest using either HTML 4.1 TRANSITIONAL or HTML 4.1 STRICT as they are accepted by more browsers, Is easier to write and construct and they easily comply with W3 Requirements
shabda
Quote:
It has no real advantages over HTML apart from the ease of intergrating XML and RSS applications.

If your HTML is xml valid, ie xhtml browsers can show it more consistently and without any rendering problems. Your document may be read in non compuer based browsers as mobiles and its more disabled friendly. BY the way this is the world disability week.
yjwong
But I feel that it is more tiring to put the /> behind of tags that doesn't have a closing. Just don't feel like it.
shabda
How much more work is putting a /> compared to >?
amrlafi
XHTML is more standard so it works on most of the browsers with the same behavior . it's more restricted than HTML costruction .every tag should be closed ,lowercase ..etc
you can convert your HTML pages to XHTML format using Tidylib , and you can validate it through the W3C XHTML validator .
KHO
XHTML is the new web standard, can be viewed on mobile devices (e.g. psp, handy, etc.) must have a "clean code" to function, and is all lowercase pretty much (a few exceptions)
Ranfaroth
To add something to previous answsers, HTML is a SGML language.
SGML was the old exchange format. It has been deprecated by XML. XHTML is just the rewrite of HTML in XML.
SGML → XML
HTML → XHTML

Modern browsers have 2 parsers : one for old HTML, and one faster for XML (including XHTML).
So writing your pages in XHTML will speed up their display Wink
Related topics
D difference between Anime and Tokusatsu... anyone know??
Difference between a Jr. Admin & MOD
Difference between watch & wife.
Is there a difference between "I know" and "I
Difference between Contests and Marketplace.
xHTML what the heck
Whats the difference between Core Duo and Hyperthreading?
what is the difference between primary partition?
What is the Difference Between Love and Affection
What is the difference between these?
What the difference of DHTML, HTML, XHTML?
What is the difference between double and single quotes?
In CSS what's the difference between class and ID
What is difference between html and wml
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.