XHTML Tutorial
You are Unregistered, please register to gain Full access.    
Desi Forums   


Go Back   Desi Forums > Ray Of Light > Tech Talk > Tutorials Cafe

Notices

XHTML Tutorial

  Discuss XHTML Tutorial at the Tutorials Cafe; Good Day DTians, After the completion of HTML tutorials,i am back agin to introduce XHTML ...

Reply
 

 
Thread Tools
  #1 (permalink)  
Old 07-16-2007, 09:18 PM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Post XHTML Tutorial

Good Day DTians,

After the completion of HTML tutorials,i am back agin to introduce XHTML tutorials.HTML Tutorials really took off,Rahen did a brilliant job continuing them and also giving it the proper climax through examples and other citations.

Ill give a brief introduction in XHTML and then continue with the classes.

XHTML as i can explain is a more cleaner,stronger and stricter version of HTML.

Pls note-Before you continue you should have a basic understanding of
"HTML and basics of building web pages" ..

Lets continue then-

Q.Firstly,What Is XHTML?
A.XHTML stands for EXtensible HyperText Markup Language .It is aimed at replacing HTML.It is identical to the HTML v 4.01.

In another definations,XHTML=HTML defined as an XML application
---------------------------------------------------------------------------

Outlining the tutorials,my further classes will cover the following Topics-

.Why you should use XHTML
.The syntax of XHTML
.XHTML validation
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-16-2007, 09:39 PM
RAHEN's Avatar
Team leader
Location: United Arab Emirates
Gender:
Visit RAHEN's Blog
 
Join Date: Apr 2006
Age: 24
Posts: 36,378
Credits: 363,869
RAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to behold
Good Job
waiting for more...Thank you...
Reply With Quote
  #3 (permalink)  
Old 07-17-2007, 10:58 AM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Thankoo.Thankoo.

Be tuned in for the updates.
Reply With Quote
  #4 (permalink)  
Old 07-18-2007, 08:57 PM
RAHEN's Avatar
Team leader
Location: United Arab Emirates
Gender:
Visit RAHEN's Blog
 
Join Date: Apr 2006
Age: 24
Posts: 36,378
Credits: 363,869
RAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to behold
theek hai
Reply With Quote
  #5 (permalink)  
Old 07-19-2007, 02:16 PM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Class1-"Why you should use XHTML?"

I hope you people have browsed through the introduction notes.Lets continue with the
class 1.Todays topic is-

"Why you should use XHTML?"

Now this question has a very simple and a logical answer.To get to know a subject one must be well equipped with all the answers that deals with a subjects credibility.
Ok so here it is.The fact is,We have reached a point where many pages on the WWW contain "bad" HTML."bad" in the sense the basic rules of html tag ends is hardly followed these days...

The following HTML code will work fine if you view it in a browser, even if it does not follow the HTML rules:



One thing i missed in the intro was telling you about XML.

"XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML.

XML is a markup language where everything has to be marked up correctly, which results in "well-formed" documents.

So the function of XML and HTML go as follows:-

XML was designed to describe data and HTML was designed to display data.

Today's market consists of different browser technologies, some browsers run Internet on computers, and some browsers run Internet on mobile phones and hand helds. The last-mentioned do not have the resources or power to interpret a "bad" markup language.

Therefore - by combining HTML and XML, and their strengths, we got a markup language that is useful now and in the future - XHTML.

XHTML pages can be read by all XML enabled devices AND while waiting for the rest of the world to upgrade to XML supported browsers, XHTML gives you the opportunity to write "well-formed" documents now, that work in all browsers and that are backward browser compatible !!!

What you sitting in for ...

Class Dismissed
Reply With Quote
  #6 (permalink)  
Old 08-01-2007, 09:56 AM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Class 2-"The Syntax of HTML"

Hello folks,

Hope you are all doing well.Since the syntax is a bit lengthy i broke the topic into two for comfortable and pleasant study.

Continuing-

XHTML when written demands a cleaner HTML syntax.

So a cleaner HTML syntax forms the first rule . A few other XHML syntax rules are as follows-

a.Attribute names must be in lower case

b.Attribute values must be quoted

c.Attribute minimization is forbidden

d.The id attribute replaces the name attribute

e.The XHTML DTD defines mandatory elements

---------------------------------------------------------------------------------------------------

Lets do a casestudy of the above syntax rules.Take the first rule down

a.Attribute Names Must Be In Lower Case

This is wrong:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

This is correct:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

--------------------------------------------------------------------------------

b.Attribute Values Must Be Quoted

This is wrong:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

This is correct:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

--------------------------------------------------------------------------------

c.Attribute Minimization Is Forbidden

This is wrong:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

This is correct:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

Here is a list of the minimized attributes in HTML and how they should be written in XHTML:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

--------------------------------------------------------------------------------

The id Attribute Replaces The name Attribute

HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.

This is wrong:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

This is correct:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

Note: To interoperate with older browsers for a while, you should use both name and id, with identical attribute values, like this:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

IMPORTANT Compatibility Note:
To make your XHTML compatible with today's browsers, you should add an extra space before the "/" symbol.

--------------------------------------------------------------------------------

The Lang Attribute

The lang attribute applies to almost every XHTML element. It specifies the language of the content within an element.
If you use the lang attribute in an element, you must add the xml:lang attribute, like this:

[Only Registered and Activated Users Can See Links. Click Here To Register...]
--------------------------------------------------------------------------------

Mandatory XHTML Elements

All XHTML documents must have a DOCTYPE declaration. The html, head and body elements must be present, and the title must be present inside the head element.
This is a minimum XHTML document template:
[Only Registered and Activated Users Can See Links. Click Here To Register...]

Note: The DOCTYPE declaration is not a part of the XHTML document itself. It is not an XHTML element, and it should not have a closing tag.

More Later.Class Dismissed.

Last edited by mytonse; 08-01-2007 at 10:17 AM.
Reply With Quote
  #7 (permalink)  
Old 08-02-2007, 08:07 AM
RAHEN's Avatar
Team leader
Location: United Arab Emirates
Gender:
Visit RAHEN's Blog
 
Join Date: Apr 2006
Age: 24
Posts: 36,378
Credits: 363,869
RAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to behold
brilliant work up there...easy to understand...well explained...
Reply With Quote
  #8 (permalink)  
Old 08-02-2007, 06:53 PM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
ThankYou RAHEN.

Making it easy and understandable has been the core focus here.
Reply With Quote
  #9 (permalink)  
Old 08-07-2007, 03:31 AM
Endurer's Avatar
Impresario
Location: Hong Kong
Gender:
Visit Endurer's Blog
 
Join Date: Feb 2005
Age: 24
Posts: 11,078
Credits: 190,720
Endurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond reputeEndurer has a reputation beyond repute
Send a message via Skype™ to Endurer
Hands on Yunus! I am loving the detail that you've provided here.
Reply With Quote
  #10 (permalink)  
Old 02-14-2008, 03:09 PM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Thumbs up Class 4-140207

Assalaams and hello..

The tut is back to stage after 4 months or more.I was tied up with exams and college.Without wasting more time..Heres your tut for today.

More info on DOCTYPE

A DOCTYPE declaration if validaion has to be done for a correct XHTML.
But fortunately/unfortunately newer browsers (like I 6) might treat the document differently depending on the <!DOCTYPE> declaration. If the browser reads a document
with a DOCTYPE, it might treat the document as "correct".Deformed XHTML page might fall over and display differently than without a DOCTYPE.


Lower Case Tag And Attribute Names

Since XHTML is case sensitive, and since XHTML only accepts lower case HTML tags and attribute names, a general search and replace function was executed to replace all upper case tags with lowercase tags. The same was done for attribute names.


Attributes must be Quoted

Since the XHTML 1.0 Recommendation states that all attribute values must be quoted, every page should have attributes values properly quoted.

Empty Tags

<hr> , <br> and <img>

Empty tags are useless in XHTML. The <hr> and <br> tags should be replaced with <hr /> and <br />.


An XHTML document is always validated against a Document Type Definition which strictly refers to the XHTML 1.0 Recommendation ..

An XHTML document is validated against a Document Type Definition (DTD). Before an XHTML file can be properly validated, a correct DTD must be added as the first line of the file.

Hope you could get into the topic back again..going through all the tuts from the start might help..Sorry for any hindrance in your learning process..Will try to be punctual hence..

Keep well..

Class dismissed.
Reply With Quote
  #11 (permalink)  
Old 03-08-2008, 01:58 AM
RAHEN's Avatar
Team leader
Location: United Arab Emirates
Gender:
Visit RAHEN's Blog
 
Join Date: Apr 2006
Age: 24
Posts: 36,378
Credits: 363,869
RAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to behold
Thank you...but i want more...doosri class kab hai...
Reply With Quote
  #12 (permalink)  
Old 03-22-2008, 03:01 PM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Very soon sis..My PC gave up ..so am joining things back..lil patience..
Reply With Quote
  #13 (permalink)  
Old 03-22-2008, 05:19 PM
RAHEN's Avatar
Team leader
Location: United Arab Emirates
Gender:
Visit RAHEN's Blog
 
Join Date: Apr 2006
Age: 24
Posts: 36,378
Credits: 363,869
RAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to beholdRAHEN is a splendid one to behold
yeah ...theek hai..
Reply With Quote
  #14 (permalink)  
Old 03-22-2008, 10:04 PM
Yawarkamal's Avatar
Intermediate
Location: Saudi Arabia
Gender:
 
Join Date: Dec 2007
Age: 23
Posts: 675
Credits: 3,318
Yawarkamal will become famous soon enough
Send a message via Yahoo to Yawarkamal
HI mytonse dear thats brilliant,I worked much in HTML & DHTML and also now little javascript, and here i love to learn XHTML ,i think acording to ure lessons is it same like HTML ? and what the main benifint of XHTML? or we use HTML & XHTML together in webpage?

Good work
Reply With Quote
  #15 (permalink)  
Old 04-28-2008, 02:25 PM
mytonse's Avatar
Exorbitant
Location: India
Gender:
Visit mytonse's Blog
 
Join Date: Dec 2005
Age: 19
Posts: 3,368
Credits: 35,706
mytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of lightmytonse is a glorious beacon of light
Send a message via MSN to mytonse Send a message via Yahoo to mytonse Send a message via Skype™ to mytonse
Yawarkamal,

Its good that you like the tuts here.I havnt still been able to get things back.Very busy with college.Further tuts in a week.

Regarding benefits i have given it in the start.We have to move up to new standards which give better optimimsation with work rather than keep with the existing old ones.
Reply With Quote
Reply

Bookmarks

Tags
information technology, learn xhtml, webmaster, websites, xhtml schema, xhtml tips, xhtml tricks, xhtml tutorial


Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Photoshop Tutorial: Collection of the Collections RAHEN