Example XHTML Document

This example illustrates the main structure of an XHTML document. Note how extra white space, tabs, and line breaks are used to make the markup tags easier to read. The extra space is irrelevant as far as the browser is concerned. the browser "swallows up" extra spaces and reduces them to a simple word space. It then formats the text appropriately.

Note also the use of special references for characters. For example the character reference &#233; is displayed as é (e with an acute accent), while the entity reference &lt; is displayed as <. You can use these references to enter characters you otherwise could not type. You can thus use entities to escape markup and display it as text, as in:

<h1> Heading string with &eacute; </h1>

Note: Dogs are not Frogs!

That's right. Dogs are not frogs. In fact, even though they are different by only one letter, they are entirely different. Frogs are amphibians, while dogs are mammals. Plus, dogs play fetch, and frogs don't. This is important to know when looking for a pet.

Note that not all examples need be as foolish as this -- although it doesn't hurt if they are humorous!