{"id":238,"date":"2007-09-18T00:00:00","date_gmt":"2007-09-18T00:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=238"},"modified":"2007-09-18T00:00:00","modified_gmt":"2007-09-18T00:00:00","slug":"XHTML MP Tables","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=238","title":{"rendered":"XHTML MP Tables"},"content":{"rendered":"<p>To create a table in XHTML MP, you need the &lt;table&gt;, &lt;tr&gt; and &lt;td&gt; tags. Data in a cell is enclosed in &lt;td&gt;&lt;\/td&gt; tags. Cells in the same row are enclosed in &lt;tr&gt;&lt;\/tr&gt; tags. All rows are enclosed in &lt;table&gt;&lt;\/table&gt; tags. So, &lt;td&gt;&lt;\/td&gt; should be enclosed in &lt;tr&gt;&lt;\/tr&gt; and &lt;tr&gt;&lt;\/tr&gt; should be enclosed in &lt;table&gt;&lt;\/table&gt;. The following XHTML MP example demonstrates how to create tables:<br \/><DIV><br \/><P><FONT class=codeText>&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;Table in XHTML MP&lt;\/title&gt;<BR>&nbsp;&nbsp;&lt;\/head&gt;<BR><BR>&nbsp;&nbsp;&lt;body&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;table&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Cell A&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Cell B&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Cell C&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/tr&gt;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Cell D&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Cell E&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td rowspan=&#8221;2&#8243;&gt;Cell F&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/tr&gt;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td colspan=&#8221;2&#8243;&gt;Cell G&lt;\/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/table&gt;<BR>&nbsp;&nbsp;&lt;\/body&gt;<BR>&lt;\/html&gt;<\/FONT><\/P><br \/><P><BR><\/P><br \/><P><FONT class=mainText>The result of the above XHTML MP markup code in mobile phone emulators is shown below:<\/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_m623edaf6.png\" width=130 align=left border=0 name=image42><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_7505d802.png\" width=134 align=left border=0 name=image43><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>WAP CSS is required to control the presentation aspect of a table. For example, if you want to add a border to the table or specify the color of a table cell, you have to make use of WAP CSS. To let you see clearly the effect of the <I>rowspan<\/I> and <I>colspan<\/I> attributes in the previous XHTML MP example, we specify black borders to the table cells with the WAP CSS <I>border<\/I> property, like this:<\/FONT><\/P><br \/><P><BR><\/P><br \/><P><FONT class=codeText>td {<BR>&nbsp;&nbsp;border: thin solid black<BR>}<\/FONT><\/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 vAlign=top><br \/><TD width=\"50%\"><br \/><P><IMG height=162 src=\"http:\/\/www.developershome.com\/wap\/xhtmlmp\/xhtml_mp_tutorial_html_4bbafa1e.png\" width=130 align=left border=0 name=image44><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_m7f0eee8a.png\" width=134 align=left border=0 name=image45><BR clear=left><FONT class=mainText>Nokia <\/FONT><\/P><\/TD><\/TR><\/THEAD><br \/><TBODY><\/TBODY><\/TABLE><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To create a table in XHTML MP, you need the &lt;table&gt;, &lt;tr&gt; and &lt;td&gt; tags. Data in a cell is enclosed in &lt;td&gt;&lt;\/td&gt; tags. Cells in the same row are enclosed in &lt;tr&gt;&lt;\/tr&gt; tags. All rows are enclosed in &lt;table&gt;&lt;\/table&gt; tags. So, &lt;td&gt;&lt;\/td&gt; should be enclosed in &lt;tr&gt;&lt;\/tr&gt; and &lt;tr&gt;&lt;\/tr&gt; should be enclosed in &lt;table&gt;&lt;\/table&gt;. &hellip; <a href=\"https:\/\/www.strongd.net\/?p=238\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">XHTML MP Tables<\/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-238","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/238","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=238"}],"version-history":[{"count":0,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/238\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}