How to create HTML table in Drupal

Posted on November 30th, 2008 in Drupal

If you using Drupal as your CMS you will find that Drupal having a simple problem about empty line for table. This is a common problem, often asked by people who works with Drupal. I dont know how to solve this since it is not a major problem, but more to wrong line break detection when recognizing HTML table

Here is the explanation, if you create the table then you will be using

<TABLE>
<TR><TD>ABC</TD><TD>DEF</TD></TR>
<TR><TD>123</TD><TD>456</TD></TR>
<TR><TD>789</TD><TD>012</TD></TR>
</TABLE>

This HTML code will made a three empty line before the table itself, so the table will be located at the bottom of the page. And if you made more line at the table, e.g 20 line, then the table will be located in very bottom of the page.

The solution, instead writing on several line like above, try to write HTML table as single line. e.g

<TABLE><TR><TD>ABC</TD><TD>DEF</TD></TR><TR><TD>123</TD><TD>456</TD></TR><TR><TD>789</TD><TD>012</TD></TR></TABLE>
And there is no empty line again, and the table will be located on correct place.

Is there any solution for this, you can see more about this discussion on Drupal Forum

Popularity: 14% [?]

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

2 Responses to “How to create HTML table in Drupal”

  1. wow wow…nice info…

  2. You can also disable automatic line breaking in the Input Format setting.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>