Focus Global Community

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: XHTML Strict Form - Here is the code.


Senior Member

Status: Offline
Posts: 183
Date:
XHTML Strict Form - Here is the code.
Permalink   
 


After some trial, error and a bunch of bloody headaches cured only by sleep and aspirin, I figured out how to create a form that is XHTML Strict. At least by the W3 Validator. Before I start using this and going nuts using it, I want to validate it here...

Now mind you every label and input has an identifier for the sole purpose of being able to move around both anywhere on the page via CSS...

Yes I know that there is HTML5, and it is the latest and greatest thing out there, but as I've said before, XHTML is the Windows XP of the PC world. It's old, it's solid and it works... HTML 5 is the Windows 7 of the world. It is gaining momentum, but it's not taken over the XP world yet... so for now I am still going to write in XHTML till open source groups start using it as a standard... which right now is slow to happen.

So in leu of my rant, I now present an XHTML Strict Form. It only has one field, but you can do what you want after the fact. Now remember, you need to save this script with Encoding in UTF-8 without BOM to pass 100%. My suggestion is using Notepad++ for Windows, or if you are on a Mac TextWrangler to make it work correctly.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Form</title>
<link rel="stylesheet" type="text/css" href="Your_CSS_Here.css" />
</head>
<body>


<form action ="Your_Database.php" method="post">
<fieldset>
   <div id ="ab"> 
         <label id="ab1">Added By:</label>
             <input id="ab2" type="text" name="Added_By" value="" />
   </div>
</fieldset> 
</form>
</body>
</html>


__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard