Skip to Content
Learning PHP & MySQL, 2nd Edition
book

Learning PHP & MySQL, 2nd Edition

by Michele E. Davis, Jon A. Phillips
August 2007
Beginner
428 pages
8h 59m
English
O'Reilly Media, Inc.
Content preview from Learning PHP & MySQL, 2nd Edition

Chapter 12. XHTML

Now that you’ve learned the foundations of using PHP and MySQL to build dynamic pages, take some time to explore improvements to the HTML markup that forms the basis of your web pages. You’ll learn about XHTML, what it demands, and why it’s worth the extra effort to produce. Remember that in order to produce quality web content from your PHP scripts, the markup must be standards-conformant. Think of the XHTML output as the finished product in the process of requesting a page after PHP and a database functions process. We’ll also discuss validating the XHTML output that your scripts produce to catch any errors.

XHTML stands for Extensible HyperText Markup Language. XHTML is a markup language that is similar to HTML, but with a stricter syntax, based on the requirements of XML. HTML was built on SGML, which is flexible but complex to process, and XML stripped down SGML to make it easier to process if a bit less flexible. XHTML syntax looks much like HTML syntax, using greater- and less-than signs (< and >) to define tags, but has much stricter requirements for how those tags are deployed. XHTML documents that meet those syntactic requirements are called well-formed, while XHTML documents that meet the syntax plus the structural rules contained in the DTDs are called valid.

Tip

Plain old HTML documents can be valid, too—they don’t have to meet XML’s syntactic rules, but they do have to live up to the structures defined in the various HTML specs.

XHTML documents can be ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning PHP, MySQL & JavaScript, 5th Edition

Learning PHP, MySQL & JavaScript, 5th Edition

Robin Nixon
Learning PHP and MySQL

Learning PHP and MySQL

Michele E. Davis, Jon A. Phillips

Publisher Resources

ISBN: 9780596514013Errata Page