Actually this is terrible advice:
Quote:
quote:
echo "<FORM method="get" action="text.php">;
should be:
echo "<FORM method=get action='text.php'>;
|
Emerging HTML standards are becoming more and more strict with each new browser release. All HTML attributes should be written in name, value pairs with all values quoted. HTML tags should be written in all lowercase letters, as future versions of HTML are going to be case-sensitive. This is actually mentioned somewhere in the beginning of Beg. PHP 4. There are a multitude of other things that should be done to make html code compatible with the emerging standards, HTML 4.01 and XHTML. For the most part this code is always back-wards compatible.
So you should writing this:
<form method="get" action="text.php">
The <br> tag is deprecated under HTML 4.01, and should be written as: <br />
The XHTML standard states that all tags should have both an opening and closing tag and includes the slash method as a shortcut for those tags which do not already have both an opening and closing tag.
so:
<img src=".../file.jpg">
should be:
<img src=".../file.jpg" alt="" />
The alt attribute is required under HTML 4.01
Old tag attributes like
width="100" height="100"
Are now deprecated and should be replaced with CSS equivalents
style="width: 100; height: 100;"
Single name attributes should be written as name, value pairs
<select size=4 multiple>
Should be written as:
<select size="4" multiple="multiple">
This new method even works on older browsers and is 100% XHTML compliant!
And this just scratches the surface, there are several deprecated tags that are still used everyday. Why Beg. PHP 4 is so sloppy in terms of HTML standards compliance, I dunno.
My advice is don't be lazy, if you intend to write professional HTML code get to know the standards. Get a hold of Wrox's HTML 4.01, a fantastic and very thorough book! Even if you THINK you're an HMTL expert, you probably aren't! I thought I was pretty savvy, hell I had taken a college course on writing HTML, and I learned quite a bit from this book.
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::