XHTML is a cleaner, stricter version of html, it has the same tags and all, but those tags must have a closing tag!
by a closing tag I mean things like </font></body></script></style>etc...
What about <p>?
The paragraph tag is alittle different from html, it has the end tag, <p>Hello CodeCall</p>
And tags that normally don't have a closing tag?
With tags like <br><hr>etc..., at the end of those tags add a space and a slash like <hr />
What is it used for?
It is used for XML which stands for eXtensible Markup Language. In XML you define your own tags, such as <pet></pet><house></house>, there are no predefined tags, so you use XHTML.
Also about XML, don't use css to style it, there is a XML lanuage for it, look on w3schools.
It could also be used to keep your html clean.
List may be confusing, you would think to use <li /> but really you use:
Sorry about my mis-info I gave earlier, I did reserch and the correct way is <li>Bob</li>
Here is a page written in xhtml
<html><head><title>My XHTML Page</title></head> <body> <p>Welcome to my XHTML page! I hope you enjoy it!</p> <ul> <h1>My list of pets!</h1> <ol> <li>Cat</li> <li>Dog</li> <li>Fish</li> <li>Mouse</li> <li>Water Snail</li> </ol> <br /> <hr /> <p>I hope you liked my example</p> <br /><br /><br /><br /><br /></body></html>If you have any more questions or comments please post them!
Edited by toxifyshadow, 13 April 2010 - 03:06 PM.