- Suppose your HTML input is
<P>Farming snails</P>
<P>1. Did you know that many kinds of snails are good to eat?
<P ALIGN="JUSTIFY">2. Snail meat tastes good and it is also good for you.</P>
<P><center><img src="s1.png"><br>Family kept strong and healthy</P>
- Make it into valid XHTML by ensuring that all start tag have an end tag and vice versa. (Note: You can use HTMLTidy to do this)

<P>Farming snails</P>
<P>1. Did you know that many kinds of snails are good to eat?</P>
<P ALIGN="JUSTIFY">2. Snail meat tastes good and it is also good for you.</P>
<P><center><img src="s1.png" /></center><br />Family kept strong and healthy</P>
- Specify the width and height of all images in the HTML file by using attributes of the <img> tag

<P>Farming snails</P>
<P>1. Did you know that many kinds of snails are good to eat?</P>
<P ALIGN="JUSTIFY">2. Snail meat tastes good and it is also good for you.</P>
<P><center><img src="s1.png" width="328" height="229" /></center><br />Family kept strong and healthy</P>
- Make sure that you have an <HTML> tag at the beginning and an </HTML> tag at the end

<HTML>
<P>Farming snails</P>
<P>1. Did you know that many kinds of snails are good to eat?</P>
<P ALIGN="JUSTIFY">2. Snail meat tastes good and it is also good for you.</P>
<P><center><img src="s1.png" width="328" height="229" /></center><br />Family kept strong and healthy</P>
</HTML>
- The title of the document on the front page can be specified using the HTML <title> tag

<HTML>
<title>My test documents title</title>
<P>Farming snails</P>
<P>1. Did you know that many kinds of snails are good to eat?</P>
<P ALIGN="JUSTIFY">2. Snail meat tastes good and it is also good for you.</P>
<P><center><img src="s1.png" width="328" height="229" /></center><br />Family kept strong and healthy</P>
</HTML>
- If you wish you can insert additional <Section> and <Description> tags into XHTML to specify sections and subsections. These can also be used to specify the book's title (if used, they override the HTML <title> tag mentioned above). The section/subsection headings are specified as “Title” metadata within a <Description> block

For example, here's a book with
Book title: My test document's title
Section, with title “No 1.”
Section, with title “No 2.”
Subsection, with title “Image”
<HTML>
<Section>
<Description>
<Metadata name="Title">My test documents title</Metadata>
</Description>
<P>Farming snails</P>
<Section>
<Description>
<Metadata name="Title">No 1.</Metadata>
</Description>
<P>1. Did you know that many kinds of snails are good to eat?</P>
</Section>
<Section>
<Description>
<Metadata name="Title">No 2.</Metadata>
</Description>
<P ALIGN="JUSTIFY">2. Snail meat tastes good and it is also good for you.</P>
<Section>
<Description>
<Metadata name="Title">Image</Metadata>
</Description>
<P><center><img src="s1.png" width="328" height="229" /></center><br />Family kept strong and healthy</P>
</Section>
</Section>
</Section>
</HTML>
- Edit the file index.html to include the URL for the HTML file containing your book (say “snail.htm”), and include the URL to the cover image, if you have one (say “snail.jpg”). You could insert other HTML text into index.html if you wish
<html>
<head>
<title></title>
<script src="RealisticBook.js" language="javascript"></script>
</head>
<body>
... Some HTML text ...
<div id="bookdiv"></div>
<script type="text/javascript">
embedProgram("snail.htm","snail.jpg");
</script>
... Additional HTML text ...
</body>
</html>