Wednesday, January 6, 2010

Section 7.12. Micro XHTMLcross Solution










7.12. Micro XHTMLcross Solution


It's been a small chapter (aren't you glad!). Here's a Micro XHTMLCross for you.



Exercise Solutions


You're going to take Tony's journal (remember him from Chapter 3?) and convert it to XHTML. We've put the
most recent version of the journal in the "chapter7/journal"
folder, where you'll find an HTML 4.01 strict version of "journal.html".


Here's the solution:



<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Change the DOCTYPE to XHTML 1.0 Strict.
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
Add the three attributes to the <html> opening tag.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /
>
The <meta> tag needs a " />", too.
<title>My Trip Around the USA on a Segway</title>
.
.
.Don't forget to put " />" in your empty elements.
</body>
</html>















No comments: