{"id":235,"date":"2007-09-18T00:00:00","date_gmt":"2007-09-18T00:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=235"},"modified":"2007-09-18T00:00:00","modified_gmt":"2007-09-18T00:00:00","slug":"XHTML MP Preformatted Text","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=235","title":{"rendered":"XHTML MP Preformatted Text"},"content":{"rendered":"<p>In XHTML MP, leading and trailing whitespaces of a paragraph is not displayed. Furthermore, two or more whitespaces in a paragraph are shown as one whitespace on the screen of mobile devices. This behavior is demonstrated in the following XHTML MP example.<br \/><DIV><br \/><P><FONT class=codeText color=#0080ff>&lt;?xml version=&#8221;1.0&#8243;?&gt;<BR>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/WAPFORUM\/\/DTD XHTML Mobile 1.0\/\/EN&#8221; &#8220;http:\/\/www.wapforum.org\/DTD\/xhtml-mobile10.dtd&#8221;&gt;<BR><BR>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<BR>&nbsp;&nbsp;&lt;head&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;XHTML MP Tutorial&lt;\/title&gt;<BR>&nbsp;&nbsp;&lt;\/head&gt;<BR><BR>&nbsp;&nbsp;&lt;body&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt; Hello, welcome <BR>to <BR>our<BR>XHTML MP tutorial. &lt;\/p&gt;<BR>&nbsp;&nbsp;&lt;\/body&gt;<BR>&lt;\/html&gt;<\/FONT><\/P><br \/><TABLE cellSpacing=0 cellPadding=4 width=\"100%\" border=0><br \/><COLGROUP><br \/><COL width=128><br \/><COL width=128><br \/><THEAD><br \/><TR vAlign=top><br \/><TD width=\"50%\"><br \/><P><IMG height=162 src=\"http:\/\/www.developershome.com\/wap\/xhtmlmp\/xhtml_mp_tutorial_html_m32b44159.png\" width=130 align=left border=0 name=image17><BR clear=left><FONT class=mainText>Sony Ericsson T610<\/FONT><\/P><\/TD><br \/><TD width=\"50%\"><br \/><P><IMG height=166 src=\"http:\/\/www.developershome.com\/wap\/xhtmlmp\/xhtml_mp_tutorial_html_9b22160.png\" width=134 align=left border=0 name=image18><BR clear=left><FONT class=mainText>Nokia Mobile Browser 4.0<\/FONT><\/P><\/TD><\/TR><\/THEAD><br \/><TBODY><\/TBODY><\/TABLE><br \/><P><BR><\/P><br \/><P><FONT class=mainText>To preserve the formatting of the text in XHTML MP, you have to use the &lt;pre&gt; element, like this example:<\/FONT><\/P><br \/><P><FONT class=codeText color=#0080ff>&lt;?xml version=&#8221;1.0&#8243;?&gt;<BR>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/WAPFORUM\/\/DTD XHTML Mobile 1.0\/\/EN&#8221; &#8220;http:\/\/www.wapforum.org\/DTD\/xhtml-mobile10.dtd&#8221;&gt;<BR><BR>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<BR>&nbsp;&nbsp;&lt;head&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;XHTML MP Tutorial&lt;\/title&gt;<BR>&nbsp;&nbsp;&lt;\/head&gt;<BR><BR>&nbsp;&nbsp;&lt;body&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;pre&gt; Hello, welcome <BR>to <BR>our<BR>XHTML MP tutorial. &lt;\/pre&gt;<BR>&nbsp;&nbsp;&lt;\/body&gt;<BR>&lt;\/html&gt;<\/FONT><\/P><br \/><P><BR><\/P><br \/><P><br \/><TABLE cellSpacing=0 cellPadding=4 width=\"100%\" border=0><br \/><COLGROUP><br \/><COL width=128><br \/><COL width=128><br \/><THEAD><br \/><TR><br \/><TD width=\"50%\"><br \/><P><IMG height=162 src=\"http:\/\/www.developershome.com\/wap\/xhtmlmp\/xhtml_mp_tutorial_html_m14956b8.png\" width=130 align=left border=0 name=image19><BR clear=left><FONT class=mainText>Sony Ericsson T610<\/FONT><\/P><\/TD><br \/><TD width=\"50%\"><br \/><P><IMG height=166 src=\"http:\/\/www.developershome.com\/wap\/xhtmlmp\/xhtml_mp_tutorial_html_6814f990.png\" width=134 align=left border=0 name=image20><BR clear=left><BR><BR><\/P><br \/><P><IMG height=166 src=\"http:\/\/www.developershome.com\/wap\/xhtmlmp\/xhtml_mp_tutorial_html_50af4ec1.png\" width=134 align=left border=0 name=image21><BR clear=left><FONT class=mainText>Nokia Mobile Browser 4.0<\/FONT><\/P><\/TD><\/TR><\/THEAD><br \/><TBODY><\/TBODY><\/TABLE><\/P><br \/><P><BR><\/P><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In XHTML MP, leading and trailing whitespaces of a paragraph is not displayed. Furthermore, two or more whitespaces in a paragraph are shown as one whitespace on the screen of mobile devices. This behavior is demonstrated in the following XHTML MP example.&lt;?xml version=&#8221;1.0&#8243;?&gt;&lt;!DOCTYPE html PUBLIC &#8220;-\/\/WAPFORUM\/\/DTD XHTML Mobile 1.0\/\/EN&#8221; &#8220;http:\/\/www.wapforum.org\/DTD\/xhtml-mobile10.dtd&#8221;&gt;&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;&nbsp;&nbsp;&lt;head&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;XHTML MP Tutorial&lt;\/title&gt;&nbsp;&nbsp;&lt;\/head&gt;&nbsp;&nbsp;&lt;body&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt; Hello, welcome &hellip; <a href=\"https:\/\/www.strongd.net\/?p=235\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">XHTML MP Preformatted Text<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-235","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=235"}],"version-history":[{"count":0,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/235\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}