Show your support by donating any amount. (Note: We are still technically a for-profit company, so your
contribution is not tax-deductible.)
PayPal Acct:
Feedback:
Donate to VoyForums (PayPal):
[ Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1 ] |
XHTML - Extensible Hypertext Markup Language - has been a big mystery to most website designers and even to other programmers. Here I will explain to you XHTML.
The plan of W3C for XHTML is quite simple, primarily to overtake HTML and to create a language that can be used in any devices (palm, cellphone) other than the Personal Computer.
XHTML 1.0 doesn't offer any new tags but gives new syntaxes and formattings that are better to follow and easier to understand.
Next versions of XHTML should give away tags. Here are some of the rules:
1. Always start the file with a !DOCTYPE declaration:
Since XML supports custom DTD usage and recent browsers doesn't support XHTML.
It is recommended and required to use the !DOCTYPE declarations for XHTML.
Here are the 3 types of !DOCTYPE declarations for XHTML:
2. For XHTML 1.1, (A very strict DTD version) the XHTML page should have a
<? xml ?> declaration:
Example: <? xml version:"1.1" xml-lang:"en"
lang:"en-us" ?>
3. If you open one, you should definitly close one!
All Tags in XHTML should be closed when opened:
Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<? xml version:"1.1" xml-lang:"en" lang:"en-us"
?>
<html>
<head>
<body>
<p>Hi
</body>
Is an error. Note that there is no closing on both <html> and
<head> tags. And the <p> tag.
4. No nested tags!
Example: <p><center>Hi</p></center> is wrong!
Should be <p><center>Hi</center></p>!
5. Close everything!
Since some HTML tags doesnt have closing tags (ex. <img>), it is required
to use a "space-slash notation".
Example: <img src="pic.jpg" />
6. <style> elements should not be commented in XHTML.
Example:
<style type="text/css">
<!--
p {color: #000000}
//-->
</style> is wrong!
Should be only:
<style type="text/css">
p {color: #000000}
</style>
7. Some depreciated tags:
<applet> - use <object> instead
<b><u><i> - use CSS instead
<isindex> - use XHTML Form input tags
<basefont> - use CSS instead
These are just some short explanations to the subject. Take care! - Andrew