How to make mobile page that uses XHTML Basic
Even if a mobile page (page for the cellular phone) is made from CHTML, any cellular phone is displayed without trouble. However, CSS cannot be used for CHTML. Still, I think that it is XHTML Basic as for the language that can be used by common in cellular phone, PDA, and information appliances, etc.
What is XHTML Basic 1.0?
The language that can be used by common in cellular phone, PDA, and information appliances, etc. is XHTML Basic 1.0. However, tag such as hr, b, big, small, sub, and sup cannot be used. CSS, because it is possible to use it, various expressions are possible.
XHTML Basic 1.0 is composed only of the module of the minimum requirement. It is possible to correspond to various terminals in one language if the page is made according to XHTML Basic 1.0.
Example of mobile page written with XHTML Basic 1.0
It is informed that the mobile page written with the following XHTML Basic 1.0 is XML document in the first line a browser.
The lang attribute cannot be used with XHTML Basic though the lang attribute can be used for XHTML 1.0 in the html tag. Only xml:lang can be used.
It is informed that text character's code is written with Shift_JIS in the meta tag in the head tag them. Naturally, the character-code is written by shift JIS. "Description meta name =" and "Keywords meta name =" are SEO measures. The title (TITLE tag) is written putting an adequate title on the page.
In the body tag, finding (H1-H6 tag) is put as the person and the search robot see easily. Sentences are composed by using the paragraph (P tag) putting the paragraph on sentences. It changes line by changing line (BR tag) to change line moderately though you may not change line excluding the paragraph. The link (A tag) is used to link.
Almost usual sentences can be made only from this. There is no problem even if P tag is not used and sentences are written without tag.
<?xml version="1.0" encoding="Shift_JIS"?> <!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" xml:lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="description" content="***********" /> <meta name="keywords" content="***,***,***" /> <link rel="stylesheet" type="text/css" href="mobile.css" /> <link rel="alternate" media="handheld" href="http://****.jp/***/***.htm" type="text/html" /> <title>*****</title> </head> <body> <h1>*****</h1> It is OK without tag <p> writes sentences by usually using P tag. </p> <br /> <a href="***">*****</a> </body> </html>
Other tag that can be used with XHTML Basic 1.0
The main tag that can be used with XHTML Basic 1.0 besides the above-mentioned is as follows.
- div position specification align = "left | center | right"
- Basic table caption, table, td, th, and tr
- pre solid writing(The source is displayed as it is.)
- ul list
- li list
- form form action ="URL" Method = "get | post"
- input text input field, radiobutton, and check box
- img image display GIF and the JPEG image can be used without trouble.
Method of telling mobile, special page to search robot
The link tag is written as follows in the head tag to tell the search robot a mobile, special page it. Url on the page is written in href. Thus, it is recognized that the search robot is a mobile page.
<link rel="alternate" media="handheld" href="http://****.jp/***/***.htm" type="text/html">
The grammar of XHTML Basic 1.0 is diagnosed.
When a mobile page is completed, let's check the grammar of XHTML Basic 1.0 on the HTML grammar diagnosis page. Let's usually assume that it only has not to be a serious error though it becomes a considerably severe diagnostic outcome.