Monday, November 17, 2008

Introduction: a practical review of XHTML

This chapter is an introduction to the Extensible Hyper Text Markup Language (XHTML) from a practical point of view, starting with simple Hyper Text Markup Language (HTML) pages and moving on quickly to XHTML documents and Web site design. You will learn how to write XHTML pages, build a functional Web site on the Internet, and get it registered on some of the most popular public search engines. Along with the Web page design, some detailed information on what happens inside the browser is also provided so that the communication and science behind the Web pages, browser, and the World Wide Web can be understood. Very little background knowledge is assumed and readers with some experience of using browsers such as Internet Explorer (IE) and Netscape (NS) should be able to complete this chapter easily.

While this chapter may not show you the whole of the subject, it should give you a solid basis for coping with more advanced stages of Web programming and technologies. Thanks to the standardization work of the World Wide Web Consortium (W3C) and many dedicated organizations and Internet engineers, Web technologies are becoming more and more stable and reliable. Many people are beginning to believe that Web applications are conquering every corner of the Internet. By following the Web standard recommended by the W3C authority, we have ensured that all examples in this chapter are XHTML compliant. They are validated as XHTML formal standard and tested on major browser software including IE5.x, IE6.+, NS4.x, NS6+, and Opera 6.+.

After covering the basic knowledge on Web configurations and how they work, this chapter will introduce some of the fundamental HTML/XHTML features such as text formatting, hyperlinks, images, and tables. These are the most basic elements that bring Web documents (or HTML files) alive. In particular, the use of images on Web pages generates a high level of visualization of documents, business logos, and commercial products. Often, they are vital for many businesses on the World Wide Web. Tables are one of the most useful tools in Web publishing: you'll find tables all over the Internet; they are often behind well-formed and structured Web pages.

Because XHTML brings strict programming style, strong discipline, and Extensible Markup Language (XML) compatibility to HTML pages, it is believed to be the next generation of HTML. Therefore in this book we generally use XHTML as our foundation for the discussion of Web technologies. Also, the discussion in this chapter will help you to understand the formal introduction to XML and XML Style Sheet Language Transformation (XSLT) in Chapter 5.

We begin by examining a sample HTML page generated by Microsoft Outlook Express. Using the simple rules and steps mentioned in section 1.2.1, HTML pages can be converted quite easily into XHTML format and put into immediate use with existing browsers such as IE or NS. Since HTML and XHTML are almost identical in practice, we generally treat all XHTML files as HTML and use the file extension ".htm."

Along with some practical examples of Web pages and the simple Cascading Style Sheet (CSS), our Web site development begins with a simple "Thank You" page for Web visitors. A page like this is handy and can be used as an error-handling page on the Internet. The "Graphical Edge" technique, using background images and transparency, is also discussed. Together with Material Effects, Animated Pictures, Hyper Links, and the integration of Tables and Frames, we develop a picture that every Web designer (or programmer) requires. By the end of this chapter, you will be able to have a Web site up and running and understand the basic XHTML building blocks of a Web page for World Wide Web users.

First, let's look at some basic details on Web requirements, Web configurations, and, more importantly, how the Web works.

No comments: