Hudzilla.org - the homepage of Paul Hudson
Contents > HTML Forms Wish List | Report Bug | About Me ]

7.1     The state of play

This is NOT the latest copy of this book; click here for the latest version.

HTML is a very simple mark-up language that offers its users a great deal of flexibility. While this might make it very easy to learn and write in, it makes the job of web browsers such as Internet Explorer and Mozilla much harder - they need to be able to cope with thousands of exceptions.

The problem with HTML was that it became used to store style rather than just information - for example, designers would use HTML to specify the font of a piece of text, as opposed to what that kind of text was . With content and style so irretrievably mixed inside HTML, computers were not able to extract information about a document simply by reading through the HTML tags used.

A movement was started to redefine how web pages are designed so that HTML would contain only content information, with a new language, CSS (cascading style sheets) storing the style information. There were also some recommending that XML was the way forward for data, and that HTML could be eliminated altogether. While the XML argument made sense, many realised that there are simply too many HTML-based web sites in existence to be able to just drop HTML, so the standard "XHTML" was born - a modification of HTML that makes it XML-compliant.

The code you see in this book is all XHTML-compliant, and I recommend you keep to this in your own work. You may notice that all HTML attributes are surrounded by quotes, and all HTML tags used in this book are closed either by using </TAG> or using <TAG /> - these are two of the rules enforced in XHTML. While teaching HTML and/or XHTML is outside the remit of this book, we are at least going to look at creating HTML forms - the primary means of sending data to PHP.

Creating and handling forms is one of the key skills of a PHP developer, so this section is particularly important - you may want to read some parts more than once to make sure it all sinks in, as you will likely need to know much of this on a regular basis.





<< 7 HTML Forms   7.2 What does it mean to be dynamic? >>
Table of Contents
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.



My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!



Top-right shadow
 
Bottom-left shadow Bottom shadow

Comments from other readers
Linux is le poop - 29 Aug 2008

Hai,
I see that you use linux, how did you get the programs for it, I have searched high a low for them, but never a success :(

Matt - 29 Aug 2008

This book does not have xhtml compliant code


All tags have to be lowercase.

A PHP User - 29 Aug 2008

"they need to be able to cope with thousands of exceptions"

which 1000s of exceptions??? html, xhtml, css etc have very strict syntax rules. :)

html does not have very strict rules really, but xhtml does. However internet explorer will read really poorly written html.

A PHP User - 29 Aug 2008

"they need to be able to cope with thousands of exceptions"

which 1000s of exceptions??? html, xhtml, css etc have very strict syntax rules. :)



Add comment
Please note that by posting a comment here you are committing it to the public domain. This is important so that others can make use of your code themselves, and also so that I can incorporate helpful notes directly into the main text. Comments are limited to 2000 characters in length.

If you are reporting an error in the content, please tell me directly.

Your name/email address:
Your comment:
 
Now, in order to verify that you're a real person, please answer this simple question: what is four plus ten?
The answer is:
(please write in
numbers, eg 19)


Top-right shadow
 
Bottom-left shadow Bottom shadow