Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Text Handling

Displaying simple text works the same way in XHTML as it does in HTML: You just place the text directly in a document. XHTML elements that display text have mixed-content models, so they can contain both text and other elements, as in this example we saw earlier:

<?xml version="1.0"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>
            Welcome to my page
        </title>
    </head>
    <body bgcolor="white" text="black" link="red" alink="blue"
        vlink="green">
        Welcome to my XHTML document.
					Want to check out more about XHTML?
					Go to
					<a href="http://www.w3c.org">W3C</a>.
    </body>
</html>


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint