Приглашаем посетить
Гумилев (gumilev.lit-info.ru)

What is the basic structure of XHTML Basic?

Table of Contents
Previous Next

What is the basic structure of XHTML Basic?

xHTML Basic documents are text based documents that contain head and body sections. HTML Basics documents are created with a text editor such as Wordpad or Notepad. Are also included in the newer SDKs such as the Nokia Toolkit 4.0. Nokia Toolkit 4.0 can develop WML, WMLScript, and XHTML Basic documents. They are given the file extension xhtml, html, or htm. Also, XHTML Basic documents can be created in a text editor, and then displayed on a Pixo Internet Microbrowser.

XHTML Basic documents use start and end tags, like HTML and WML. The html element encloses both the head section (represented by using the head element) and the body section (represented by using the body element). The head section contains information about the XHTML Basic document, such as the document’s title. The body section contains the content that a browser displays when users visit the Web page.

Example 1 and figure 1.2 shows an xHTML code example and screen display shows a simple XHTML Basic document. The first three lines are required in XHTML Basic documents, and will be the same in all XHTML Basic documents. The fourth line has the < html> tag, which has a required attribute of xmlns and a value of http://www.w3.org/1999/xhtml.

Listing 1:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
http://www.w3.org/TR/xhtml;-basic/xhtml-basic10.dtd>

<html xmlns=http://www.w3.org/1999/xhtml>
 <head>
 <title> Welcome</title>
 <head>
  <body>
  <!—displays a welcome message>

     <p>
     Welcome to XHTML Basic!</p>
  </body>
</html>
Click To expand
Figure 1.2: XHTML Basic Screen

Comments in XHTML Basic are delineated with <!— comment — >. This is the same format used in WML documents. Next, the <head> tag and the </head> tag surround the head section of the document. The <title> tag is located in the head section, and in this example simply has a title of “Welcome.” This title generally shows up in the title bar of the browser. As in most markup languages, the text included within the start and end tags (in this case <title> and </title>) become the title.

Next comes the body section, bounded by the <body> and </body> tags. The <p> and </p> tags specify what is displayed in the browser. The document is closed with a </html> tag. This example shows the layout of the <head> section and the <body> section, with a Welcome message in the <body> section and this produces the Welcome message screen display.


Table of Contents
Previous Next