The DOCTYPE To make sure your browser knows to read the xhtml coding, use the following code at the beggining of your source:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Some XHTML Rules:
First, and most important rule is to always close your tags.
<body> <center> <b>This is a great page</b> </body>
No.
<body> <center> <b>This is an even better page</b> </center> </body>
Yes
Another rule is that you can't use capitals with any part of the tags, or tag astrabutes.
<MARQUEE>No no no!</MARQUEE>
No.
<marquee>Yes yes yes!</marquee>
Yes.
Next rule is that with only one opening tag (br, img, etc...) use a /> to close it.
<img src="images/picture.gif"> <br>
No.
<img src="images/picture.gif" /> <br />
Yes.
Next, is to make sure you use "=" and " symbols.
<img src="www.site.com/picture.gif" height 100 width 100>
No,
<img src="www.site.com/picture.gif" height="100" width="100" />
These are the basic rules of XHTML that you should follow.
These are all that I that I will mention. I will post a second tutorial containing more rules and some basic tags. Good luck and have fun.
|