The myth of HTML – xHTML (Part 1)

I believe my relationship with HTML is almost 6-7 years old, while xHTML is fairly a new term for me having around 3-4 years of experience working with it. As most of my fellow web designer and developers i was also not aware of the difference between them and often mixed up both of them, and HTML and xHTML remained a myth for me till recently. So here i will explain what i know about HTML and xHTML and as usual i will try to share a few very useful and information based links to help you better understand them both.

HTML and xHTML are both markup tags. Basically you write HTML Tags which when compiled are visible as a single web document. There isn’t much difference between these two terminologies as both uses Tags

HTML stands for Hyper Text Markup Language
xHTML stands for EXtensible HyperText Markup Language

XHTML is a stricter and cleaner version of HTML. Its the simplest line of text that defines the basics of these two. Basically HTML 4.01 (which some programmers calls HTML5.0 to attract others attention) and xHTML are almost identical.
XHTML is HTML defined as an XML application – This somehow more satisfy the basics of xHTML, i once use to call it xML and HTML when asked in interviews about their difference as it was fairly a new term at that time and believe me i was asked this question “What do you know about xHTML and HTML” or “What is the difference between HTML and xHTML” and every time my answer would be different as to be honest i didn’t know anything about their differences. Even today i am considered an Expert in creating Standards Compliant Code in xHTML/CSS but still if i am asked to have a debate on HTML and xHTML i will have very limited information to share with my listeners.
One other definition just came into my mind it that “

xHTML is the future standard of HTML owned and implemented by W3C (world wide web consortium) and all the browsers in future will 100% support xHTML

“. This is rather more kind of explanation than a definition. But this is true as earlier every browser had their own standards and therefore a website might look good in one browser while would break up in another. Lets say for example IE and Safari. Till IE6 and safari at that era both standards were different and even now you will see web pages those are not updated to xHTML will look broken up.

Do you know how you define a web page if it is going to follow which standard ?
Its the Doctype where you define which standard your web page is going to follow

For Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> – This line tells the browser that this document is xHTML 1.0 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> This line tells the browser that this document is HTML 4.01 Transitional

Till now my debate was on HTML and xHTML, though i also mentioned xHTML 1.0 and HTML 4.01 but what is this Transitional term doing.
There are two terminologies used

  • Strict
  • Transitional

1) Strict – It’s basically doctype of the mentioned HTML or xHTML and tells the validator to strictly follow the rules for the mentioned document.
2)Transitional – It’s also doctype of the mentioned HTML or xHTML but its more kind of friendly and will skip issues that is not much of importance.

My fingers started to hurt. I can write more than over 100 pages on this topic so i think it will be better if i can answer your questions regarding this topic rather than writing so much that you wont get enough time to read it all.

I will write about CSS as well in coming days…

References: w3schools and WIKI

    • yasie
    • November 19th, 2009

    The Rigor added to html is a pivot compatibility feature between universally acceptable HTML and Universally portable XML the two Magy MLs.

    This is a fabulous effort, really awsome. can we join this artical as to me its pretty initial but usable information as i have few fine years of experience of this tech with XSLT, XHTML and WURFL. but i need a favor that i req yu, keep your effort up & if there is a mechanism of joint venture i will be glad to participate.

  1. No trackbacks yet.